-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (33 loc) · 811 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
42
43
44
45
46
47
48
ifndef SMITHLAB_CPP
$(error Must define SMITHLAB_CPP variable)
endif
PROGS = subsample-epireads
SOURCES = $(wildcard *.cpp)
INCLUDEDIRS = $(SMITHLAB_CPP)
INCLUDEARGS = $(addprefix -I,$(INCLUDEDIRS))
LIBS += -lgsl -lgslcblas
CXX = g++
CXXFLAGS = -Wall -fmessage-length=50
OPTFLAGS = -O2
DEBUGFLAGS = -g
ifeq "$(shell uname)" "Darwin"
CFLAGS += -arch x86_64
endif
ifdef DEBUG
CXXFLAGS += $(DEBUGFLAGS)
endif
ifdef OPT
CXXFLAGS += $(OPTFLAGS)
endif
all: $(PROGS)
$(PROGS): $(addprefix $(SMITHLAB_CPP)/, GenomicRegion.o smithlab_os.o \
smithlab_utils.o OptionParser.o)
$(PROGS): \
$(addprefix $(SMITHLAB_CPP)/, RNG.o)
%.o: %.cpp %.hpp
$(CXX) $(CXXFLAGS) -c -o $@ $< $(INCLUDEARGS)
%: %.cpp
$(CXX) $(CXXFLAGS) -o $@ $^ $(INCLUDEARGS) $(LIBS)
clean:
@-rm -f $(PROGS) *.o *.so *.a *~
.PHONY: clean