-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·37 lines (28 loc) · 759 Bytes
/
Makefile
File metadata and controls
executable file
·37 lines (28 loc) · 759 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
32
33
34
35
RM = rm -f
GCLIB := ../gclib
INC := -I$(GCLIB)
CC := g++
LDFLAGS =
BASEFLAGS := -std=c++11 $(INC) -Wall -Wextra -D_REENTRANT -fno-exceptions -fno-rtti
ifeq ($(findstring release,$(MAKECMDGOALS)),)
CFLAGS := -g -DDEBUG $(BASEFLAGS)
LDFLAGS += -g
else
CFLAGS := -O2 -DNDEBUG $(BASEFLAGS)
endif
%.o : %.cpp
${CC} ${CFLAGS} -c $< -o $@
# C/C++ linker
LINKER := g++
LIBS :=
OBJS := $(GCLIB)/GBase.o $(GCLIB)/gdna.o $(GCLIB)/codons.o \
$(GCLIB)/GFaSeqGet.o $(GCLIB)/gff.o interval_tree.o $(GCLIB)/GArgs.o
.PHONY : all
all: mapped_nc
mapped_nc: mapped_nc.o $(OBJS)
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
# target for removing all object files
.PHONY : clean
clean::
@${RM} $(OBJS) mapped_nc.o mapped_nc
@${RM} core.*