forked from chenkui164/FastASR
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (32 loc) · 1.13 KB
/
Makefile
File metadata and controls
48 lines (32 loc) · 1.13 KB
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
SRC_PATH = ./src
DIRS = $(shell find $(SRC_PATH) -maxdepth 3 -type d)
SRCS_CXX += $(foreach dir, $(DIRS), $(wildcard $(dir)/*.cpp))
VPATH = $(DIRS)
OBJECTS=$(addprefix obj/,$(notdir $(SRCS_CXX:.cpp=.o)))
# OBJECTS=$(SRCS_C:.c=.o)
DEPENDS=$(OBJECTS:.o=.d)
CXXFLAGS+=-O3 -std=c++11
# CXXFLAGS+=-Wall -fdiagnostics-color=auto -std=c++11 -fext-numeric-literals -O2 -pthread -fopenmp -Wl,-rpath-link=/home/ck/work/am_msk/libs/lib
# CXXFLAGS+=-Wall -fdiagnostics-color=auto -std=c++11 -fext-numeric-literals -O2 -pthread -fopenmp -Wl,-rpath-link=/home/ck/work/am_msk/libs/lib
PC_CXX=g++
CXX=$(PC_CXX)
LDLIBS=-lm -lfftw3f -lopenblas
# LDPATH+=-L/usr/local/lib
# INCLUDEPATH+=-I /usr/local/include
# test:
# $(OBJECTS)
fastasr : $(OBJECTS)
$(CXX) -o fastasr $(CXXFLAGS) $(OBJECTS) $(LDLIBS) $(LDPATH)
obj/%.o:%.cpp
$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCLUDEPATH) $(PREDEFINE)
obj/%.d:%.cpp
@set -e; rm -f $@; $(CC) -MM $< $(INCLUDEFLAGS) > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,obj/\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
include $(DEPENDS)
.PHONY : clean install
install : fastasr
expect ./download.ext
clean:
@rm -f obj/*
@rm -f fastasr