-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
33 lines (24 loc) · 810 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
sourcelist = list
passphrase = my_AES128_passphrase
# cross-platform compatibility
ifeq ($(OS),Windows_NT)
RM = del /Q bin\respack.exe lib\librespack.a test\test.exe
else
RM = rm bin/respack.exe lib/librespack.a test/test.exe
endif
all: bin/respack test/test
bin/respack: lib/librespack.a
gcc respack/respack.c lib/librespack.a -I"include" -o bin/respack.exe -s
lib/librespack.a:
gcc src/*.c -I"include" -c -s
ar rcs lib/librespack.a *.o
test/test: lib/librespack.a
gcc test/test.c lib/librespack.a -I"include" -o test/test.exe -s
# without encryption
cd test && "../bin/respack.exe" $(sourcelist).txt
cd test && test.exe $(sourcelist).dat
# with encryption
cd test && "../bin/respack.exe" $(sourcelist).txt $(passphrase)
cd test && test.exe $(sourcelist).dat $(passphrase)
clean:
$(RM)