-
Notifications
You must be signed in to change notification settings - Fork 63
/
Makefile
34 lines (26 loc) · 588 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
DIR_INC = ./inc
DIR_SRC = ./src
DIR_OBJ = ./obj
BINDIR=/usr/local/bin
SRC = $(wildcard ${DIR_SRC}/*.cpp)
OBJ = $(patsubst %.cpp,${DIR_OBJ}/%.o,$(notdir ${SRC}))
TARGET = genefuse
BIN_TARGET = ${TARGET}
CC = g++
CFLAGS = -std=c++11 -g -I${DIR_INC}
${BIN_TARGET}:${OBJ}
$(CC) $(OBJ) -lz -lpthread -o $@
${DIR_OBJ}/%.o:${DIR_SRC}/%.cpp make_obj_dir
$(CC) $(CFLAGS) -O3 -c $< -o $@
.PHONY:clean
clean:
rm obj/*.o
rm genefuse
make_obj_dir:
@if test ! -d $(DIR_OBJ) ; \
then \
mkdir $(DIR_OBJ) ; \
fi
install:
install $(TARGET) $(BINDIR)/$(TARGET)
@echo "Installed."