-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
42 lines (30 loc) · 829 Bytes
/
Makefile
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
32
33
34
35
36
37
38
39
40
41
CXX=g++ -g -std=c++0x
ifeq ($(detected_OS),Darwin) # Mac OS X
CXX += -stdlib=libstdc++
endif
LDFLAGS = -I. -lm -O2 -lpthread
PREFIX = $(DESTDIR)/usr/local
#PREFIX = /usr/local
OBJDIR=.
SRCS = $(wildcard filtering/*.cc)
OBJS = $(foreach OBJ,$(SRCS:.cc=.o),$(OBJDIR)/$(OBJ))
DEPS = $(wildcard *.h)
$(OBJDIR):
if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi
$(OBJDIR)/%.o: %.cc $(DEPS)
$(CXX) -c $(LDFLAGS) -o $@ $<
all: $(OBJDIR) adVNTR-Filtering
adVNTR-Filtering: $(OBJS)
$(CXX) -o $@ $^ $(LDFLAGS)
.PHONY: clean
.PHONY: all
.PHONY: archive
.PHONY: install
.PHONY: uninstall
clean:
rm -f *~ $(OBJDIR)/*.o filtering/*.o adVNTR-Filtering
archive: clean
install: adVNTR-Filtering
install -m 755 adVNTR-Filtering $(DESTDIR)$(PREFIX)/bin
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/adVNTR-Filtering