-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
64 lines (41 loc) · 1.34 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
comprefix = arm-linux-gnueabihf-
CC = $(comprefix)gcc
CXX = $(comprefix)g++
base = -Wall -g -fPIC -I .
cflags = $(base)
cppflags = $(base) -std=c++14
linkflags = $(base) -lpthread -L . libsqlite3.so.0.8.6
cgi += lightoff.cgi lighton.cgi mpu6050.cgi
all:aimwrite hardconnectd test.cgi cgi_reg.cgi cgi_log.cgi $(cgi)
#cp hardconnectd /rootfs
#cp aimwrite /rootfs
cp *.cgi /rootfs/www/cgi-bin
cp *.html /rootfs/www
cp -d *.so /rootfs/lib
cp mpu6050/*.ko /rootfs
lightoff.cgi:lightoff.cpp libctl.so cgic.o
$(CXX) -o $@ $^ $(cppflags) $(linkflags)
lighton.cgi:lighton.cpp libctl.so cgic.o
$(CXX) -o $@ $^ $(cppflags) $(linkflags)
mpu6050.cgi:mpu6050.cpp libctl.so cgic.o
$(CXX) -o $@ $^ $(cppflags) $(linkflags)
test.cgi:test.cpp libctl.so cgic.o
$(CXX) -o $@ $^ $(cppflags) $(linkflags)
cgi_reg.cgi:cgi_reg.cpp cgic.o libctl.so
$(CXX) -o $@ $^ $(cppflags) $(linkflags)
cgi_log.cgi:cgi_log.cpp cgic.o libctl.so
$(CXX) -o $@ $^ $(cppflags) $(linkflags)
aimwrite:cgi_write.o cgic.o libctl.so
$(CC) -o $@ $^ $(linkflags)
cgi_write.o:cgi_write.cpp
$(CXX) -o $@ -c $^ $(cppflags)
cgic.o:cgic.c
$(CC) -o $@ -c $^ $(cflags)
libctl.so:cgi_ctl.o
$(CXX) -o $@ $^ $(linkflags) -shared
cgi_ctl.o:cgi_ctl.cpp
$(CXX) -o $@ -c $^ $(cppflags)
hardconnectd:hardconnect.c
$(CC) -o $@ $^ $(cflags)
clean:
-rm -rf ./*.so ./*.o aimwrite hardconnectd