-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (34 loc) · 700 Bytes
/
Makefile
File metadata and controls
43 lines (34 loc) · 700 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
36
37
38
39
40
41
42
43
#
# http://www.gnu.org/software/make/manual/make.html
#
CPP=g++
INCLUDES=
CFLAGS=-Wall -ggdb
LDFLAGS=
EXE=example.out detect-au.out
SRC=DtmfDetector.cpp DtmfGenerator.cpp
OBJ=$(patsubst %.cpp,obj/%.o,$(SRC))
#
# This is here to prevent Make from deleting secondary files.
#
.SECONDARY:
debug: CFLAGS += -DDEBUG=1
debug: all
#
# $< is the first dependency in the dependency list
# $@ is the target name
#
all: dirs $(addprefix bin/, $(EXE)) tags
dirs:
mkdir -p obj
mkdir -p bin
tags: *.cpp *.hpp
ctags *.cpp *.hpp
bin/%.out: obj/%.o $(OBJ)
$(CPP) $(CFLAGS) $< $(OBJ) $(LDFLAGS) -o $@
obj/%.o : %.cpp
$(CPP) $(CFLAGS) $< $(INCLUDES) -c -o $@
clean:
rm -f obj/*
rm -f bin/*
rm -f tags