-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 829 Bytes
/
Makefile
File metadata and controls
31 lines (23 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
DESTDIR=./lib
SRCDIR=./src
INCLUDE=./include
BINDIR=./bin
LIB = $(DESTDIR)/libnmo.so $(DESTDIR)/libnmo.a
BIN := $(patsubst %.cc,%,$(wildcard $(BINDIR)/*.cc) $(wildcard lbench/*.cc)) $(patsubst %.c,%,$(wildcard $(BINDIR)/*.c))
TEST := $(filter $(BINDIR)/test_%,$(BIN))
LIB_OBJECTS := $(patsubst %.cc,%.o,$(wildcard $(SRCDIR)/*.cc))
DEPS = $(LIB_OBJECTS:%.o=%.d)
CXX=g++
override CXXFLAGS+= -fopenmp -fPIC -O2 -Wall -std=c++14 -g -I./include -MMD
CFLAGS = -O2 -Wall -g -MMD -I./include
LDLIBS=-lpfm -lnuma -lcrypto
all: $(LIB) $(BIN)
$(TEST) bin/stream: $(DESTDIR)/libnmo.a
bin/stream: CFLAGS += -fopenmp
bin/setup_waste: LDLIBS=-lnuma
-include $(DEPS)
$(LIB): $(LIB_OBJECTS)
-mkdir -p $(DESTDIR)
$(CXX) $(LDFLAGS) $^ -o $@ -shared $(LDLIBS)
clean:
-rm -rf $(DESTDIR) $(SRCDIR)/*.o $(SRCDIR)/*.d *~ $(BIN) $(BINDIR)/*.d