-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
56 lines (39 loc) · 1.11 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
#encoder
run : main
@LD_LIBRARY_PATH=`pwd`/lib/encoder:`pwd`/lib/decoder:`pwd`/lib/test ./bin/main.exe
obj/encoder:
mkdir -p obj/encoder/
encoder.o : obj/encoder
g++ -c src/encoder/encoder.cpp -I inc/ -o obj/encoder/encoder.o
lib/encoder:
mkdir -p lib/encoder
encoder.so : lib/encoder encoder.o
g++ -shared -fPIC obj/encoder/encoder.o -o lib/encoder/libencoder.so
#decoder
obj/decoder:
mkdir -p obj/decoder/
decoder.o : obj/decoder
g++ -c src/decoder/decoder.cpp -I inc/ -o obj/decoder/decoder.o
lib/decoder:
mkdir -p lib/decoder
decoder.so : lib/decoder decoder.o
g++ -shared -fPIC obj/decoder/decoder.o -o lib/decoder/libdecoder.so
#main
bin :
mkdir bin
main.o:
g++ -c src/main.cpp -I inc/ -o obj/main.o
main: bin encoder.so decoder.so main.o test.a
g++ obj/main.o -I ./inc -L ./lib/decoder -L ./lib/encoder -L ./lib/test -lencoder -ldecoder -ltest -o bin/main.exe
#test
obj/test:
mkdir -p obj/test/
test.o : obj/test
g++ -c src/test/test.cpp -I inc/ -o obj/test/test.o
lib/test:
mkdir -p lib/test
test.a : lib/test test.o
ar cvq lib/test/libtest.a obj/test/test.o
#end
clean:
rm -R obj lib bin