-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (42 loc) · 792 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
49
50
51
52
CXXFLAGS+=-Wall
CXXFLAGS+=-W
CXXFLAGS+=-Werror
ifdef PROFILE
CXXFLAGS+= -pg -g
endif
ifdef DEBUG
CXXFLAGS:=-Og -ggdb -march=native $(CXXFLAGS)
else
CXXFLAGS:=-O3 -s -march=native $(CXXFLAGS)
endif
PKGCONFIG:=pkg-config
#Need g++ 4.8+
CPPFLAGS+=-std=c++11
ifndef NOSND
CPPFLAGS+=$(shell $(PKGCONFIG) sndfile --cflags)
CPPFLAGS+=-DHAVE_SNDFILE
LDFLAGS+=$(shell $(PKGCONFIG) sndfile --libs)
endif
ifdef PROFILE
LDFLAGS+=-pg -g
endif
ifdef DEBUG
LDFLAGS+=-ggdb
else
LDFLAGS+=-s
endif
SRCS=clHCA.cpp main.cpp Path.cpp
OBJS=$(subst .cpp,.o,$(SRCS))
EXE=hcadec
all: $(EXE)
$(EXE): $(OBJS)
$(CXX) $^ -o $@ $(LDFLAGS)
depend: .depend
.depend: $(SRCS)
$(RM) ./.depend
$(CXX) $(CPPFLAGS) -MM $^>>./.depend;
clean:
$(RM) $(OBJS) $(EXE)
dist-clean: clean
$(RM) *~ .depend
include .depend