mirror of
https://github.com/plasma-umass/coz.git
synced 2024-09-11 04:55:25 +03:00
Merge pull request #140 from plasma-umass/libelfin-pkg-config
Use pkg-config to link in libelfin
This commit is contained in:
commit
3c68685e8e
@ -1,6 +1,6 @@
|
||||
ROOT := ../..
|
||||
TARGETS := histogram
|
||||
LIBS := pthread
|
||||
LIBS := -lpthread
|
||||
CFLAGS := -g -O2
|
||||
|
||||
include $(ROOT)/benchmark.mk
|
||||
|
@ -1,6 +1,6 @@
|
||||
ROOT := ../..
|
||||
TARGETS := kmeans
|
||||
LIBS := pthread
|
||||
LIBS := -lpthread
|
||||
CFLAGS := -g -O2
|
||||
|
||||
include $(ROOT)/benchmark.mk
|
||||
|
@ -1,6 +1,6 @@
|
||||
ROOT := ../..
|
||||
TARGETS := linear_regression
|
||||
LIBS := pthread
|
||||
LIBS := -lpthread
|
||||
CFLAGS := -g -O2
|
||||
|
||||
include $(ROOT)/benchmark.mk
|
||||
|
@ -1,6 +1,6 @@
|
||||
ROOT := ../..
|
||||
TARGETS := matrix_multiply
|
||||
LIBS := pthread
|
||||
LIBS := -lpthread
|
||||
CFLAGS := -g -O2 -Wno-format
|
||||
|
||||
include $(ROOT)/benchmark.mk
|
||||
|
@ -1,6 +1,6 @@
|
||||
ROOT := ../..
|
||||
TARGETS := pbzip2
|
||||
LIBS := bz2 pthread
|
||||
LIBS := -lbz2 -lpthread
|
||||
CXXFLAGS := -g -O2 -Wno-format -Ibzip2-1.0.6
|
||||
LDFLAGS := -Lbzip2-1.0.6
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
ROOT := ../..
|
||||
TARGETS := pca
|
||||
LIBS := pthread
|
||||
LIBS := -lpthread
|
||||
CFLAGS := -g -O2
|
||||
|
||||
include $(ROOT)/benchmark.mk
|
||||
|
@ -1,6 +1,6 @@
|
||||
ROOT := ../..
|
||||
TARGETS := producer_consumer
|
||||
LIBS := pthread
|
||||
LIBS := -lpthread
|
||||
CXXFLAGS := -g -O2
|
||||
|
||||
include $(ROOT)/benchmark.mk
|
||||
|
@ -1,6 +1,6 @@
|
||||
ROOT := ../..
|
||||
TARGETS := string_match
|
||||
LIBS := pthread
|
||||
LIBS := -lpthread
|
||||
CFLAGS := -g -O2
|
||||
|
||||
include $(ROOT)/benchmark.mk
|
||||
|
@ -1,6 +1,6 @@
|
||||
ROOT := ../..
|
||||
TARGETS := toy
|
||||
LIBS := pthread
|
||||
LIBS := -lpthread
|
||||
CXXFLAGS := --std=c++11 -g -O2
|
||||
|
||||
include $(ROOT)/benchmark.mk
|
||||
|
@ -1,6 +1,6 @@
|
||||
ROOT := ../..
|
||||
TARGETS := word_count
|
||||
LIBS := pthread
|
||||
LIBS := -lpthread
|
||||
CFLAGS := -g -O2
|
||||
|
||||
include $(ROOT)/benchmark.mk
|
||||
|
@ -23,7 +23,6 @@ endif
|
||||
# Default flags
|
||||
CFLAGS ?= -g -O2
|
||||
CXXFLAGS ?= $(CFLAGS)
|
||||
LDLIBS += $(addprefix -l,$(LIBS))
|
||||
|
||||
# Default source and object files
|
||||
SRCS ?= $(wildcard *.cpp) $(wildcard *.c)
|
||||
@ -79,7 +78,7 @@ obj/%.o: %.c $(PREREQS)
|
||||
# Link a shared library
|
||||
$(SHARED_LIB_TARGETS): $(OBJS)
|
||||
@echo $(LOG_PREFIX) Linking $@ $(LOG_SUFFIX)
|
||||
@$(CXX) -shared $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
||||
@$(CXX) -shared $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
$(STATIC_LIB_TARGETS): $(OBJS)
|
||||
@echo $(LOG_PREFIX) Linking $@ $(LOG_SUFFIX)
|
||||
@ -88,7 +87,7 @@ $(STATIC_LIB_TARGETS): $(OBJS)
|
||||
# Link binary targets
|
||||
$(OTHER_TARGETS): $(OBJS)
|
||||
@echo $(LOG_PREFIX) Linking $@ $(LOG_SUFFIX)
|
||||
@$(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
||||
@$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
# Include dependency rules for all objects
|
||||
-include $(OBJS:.o=.d)
|
||||
|
@ -1,7 +1,8 @@
|
||||
ROOT := ..
|
||||
TARGETS := libcoz.so
|
||||
LIBS := dl rt pthread elf++ dwarf++
|
||||
CXXFLAGS := --std=c++0x -g -O2 -fPIC -I$(ROOT)/include -I.
|
||||
LIBS := -ldl -lrt -lpthread $(shell pkg-config --libs libelf++ libdwarf++)
|
||||
CXXFLAGS := --std=c++0x -g -O2 -fPIC -I$(ROOT)/include -I. \
|
||||
$(shell pkg-config --cflags libelf++ libdwarf++)
|
||||
|
||||
include $(ROOT)/common.mk
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user