forked from gps-sdr/gps-sdr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
105 lines (74 loc) · 2.05 KB
/
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
CC = g++
ASM = g++
LINK= g++
CINCPATHFLAGS = -Iaccessories \
-Iacquisition \
-Iincludes \
-Imain \
-Iobjects \
-Isimd \
-Iusrp
VPATH = accessories: \
acquisition: \
includes: \
main: \
objects: \
simd: \
usrp:
LDFLAGS = -lpthread -lusrp -m32
CFLAGS = -O2 -D_FORTIFY_SOURCE=0 -g3 -m32 $(CINCPATHFLAGS)
ASMFLAGS = -masm=intel
SKIP = %main.cpp %simd-test.cpp %fft-test.cpp %acq-test.cpp %sse_new.cpp %gps-usrp.cpp
SRCC = $(wildcard main/*.cpp simd/*.cpp accessories/*.cpp acquisition/*.cpp objects/*.cpp usrp/*.cpp)
SRC = $(filter-out $(SKIP), $(SRCC))
OBJS = $(SRC:.cpp=.o)
OBJS += usrp/gn3s_firmware.o
HEADERS = $(wildcard accessories/*.h acquisition/*.h main/*.h objects/*.h simd/*.h includes/*.h)
#Uncomment these to look at the disassembly
#DIS = x86.dis \
EXE = gps-sdr \
gps-gse
EXTRAS= gps-usrp
TEST = simd-test
all: $(EXE)
@echo ---- Build Complete ----
extras: extraclean $(EXTRAS)
test: testclean $(TEST)
gps-sdr: main.o $(OBJS) $(DIS) $(HEADERS)
$(LINK) $(LDFLAGS) -o $@ main.o $(OBJS)
simd-test: simd-test.o $(OBJS)
$(LINK) $(LDFLAGS) -o $@ simd-test.o $(OBJS)
%.o:%.cpp $(HEADERS)
$(CC) $(CFLAGS) -c $< -o $@
%.dis:%.cpp
$(CC) $(CFLAGS) -S $< -o $@
%.o:%.s
$(ASM) $(CFLAGS) -c $< -o $@
%.o:%.ihx
ld -r -b binary $< -o $@
gps-gse:
make --directory=./gse
gps-usrp:
make --directory=./usrp
clean: distclean execlean testclean extraclean doxyclean
minclean: oclean
oclean:
@rm -rvf `find . \( -name "*.o" \) -print`
distclean:
@rm -rvf `find . \( -name "*.o" -o -name "*.dis" -o -name "*.dat" -o -name "*.klm" -o -name "*.m~" -o -name "*.tlm" -o -name "*.log" \) -print`
execlean:
@rm -rvf $(EXE)
testclean:
@rm -rvf $(TEST)
extraclean:
@rm -rvf $(EXTRA)
doxyclean:
rm -rvf ./documentation/html
doxy:
doxygen ./documentation/Doxyfile
install:
mkdir -p /usr/share/gps
cp gps-sdr /usr/share/gps
cp gps-gse /usr/share/gps
ln -f -s /usr/share/gps/gps-sdr /usr/sbin/gps-sdr
ln -f -s /usr/share/gps/gps-gse /usr/sbin/gps-gse