summaryrefslogtreecommitdiff
path: root/other/burneye/src/Makefile
diff options
context:
space:
mode:
authorRoot THC2026-02-24 12:42:47 +0000
committerRoot THC2026-02-24 12:42:47 +0000
commitc9cbeced5b3f2bdd7407e29c0811e65954132540 (patch)
treeaefc355416b561111819de159ccbd86c3004cf88 /other/burneye/src/Makefile
parent073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff)
initial
Diffstat (limited to 'other/burneye/src/Makefile')
-rw-r--r--other/burneye/src/Makefile116
1 files changed, 116 insertions, 0 deletions
diff --git a/other/burneye/src/Makefile b/other/burneye/src/Makefile
new file mode 100644
index 0000000..55cf561
--- /dev/null
+++ b/other/burneye/src/Makefile
@@ -0,0 +1,116 @@
1
2ifeq ($(debug),on)
3CFLAGS += -g -ggdb
4DFLAGS += -DDEBUG -DVDEBUG
5MPASS += debug=on
6endif
7
8CFLAGS += -Wall $(DFLAGS)
9
10CC=gcc
11OBJS = common.o \
12 cipher-glfsr.o cipher-rc4.o cipher-sha1.o fingerprint.o rs.o
13
14# basic targets
15#
16
17all: debug fingerprint stub/stub.bin burneye.c $(OBJS)
18 $(CC) $(CFLAGS) -o burneye burneye.c $(OBJS)
19
20harddist: clean stub/stub.bin burneye.c $(OBJS)
21 diet $(CC) -DSTANDALONE $(CFLAGS) -o fingerprint -static \
22 stub/fingerprint.c rs.o cipher-sha1.o
23 strip fingerprint
24 stub/utils/sstrip fingerprint
25
26 diet $(CC) $(CFLAGS) -o burneye burneye.c -static $(OBJS)
27 strip burneye
28 stub/utils/sstrip burneye
29
30 ./burneye fingerprint
31 mv output fingerprint
32 chmod 700 fingerprint
33 readelf -l fingerprint
34
35 # burneye itself should be the last binary, for that it will
36 # modify itself
37 ./burneye -B BANNER-BURNEYE -p accept burneye
38 mv output burneye
39 chmod 700 burneye
40 readelf -l burneye
41
42
43# release=release-string should be set ;)
44release: clean harddist
45 mkdir ../dist/burneye-$(release)/
46 cp burneye fingerprint ../dist/burneye-$(release)/
47 cp ../doc/DIST-README ../dist/burneye-$(release)/README
48 chmod 600 ../dist/burneye-$(release)/README
49 chmod 700 ../dist/burneye-$(release)/burneye \
50 ../dist/burneye-$(release)/fingerprint
51
52# clean targets
53#
54
55clean:
56 rm -f debug/memdump
57 rm -f *.o burneye
58 rm -f fingerprint
59 rm -f rstest
60 rm -f output date.eye
61 make -C stub clean
62
63
64# debug targets
65#
66
67debug: debug/memdump
68
69debug/memdump: debug/memdump.c
70 $(CC) $(CFLAGS) -o debug/memdump debug/memdump.c
71
72regress: regress-clean all date.eye regress.sh
73 ./regress.sh
74
75regress-clean: clean
76 rm -f date.eye
77 rm -f date.*.0x* date.*.regs
78
79date.eye: date all
80 ./burneye date
81 mv output date.eye
82 chmod 700 date.eye
83
84
85# sub object-targets
86#
87
88cipher-glfsr.o: stub/cipher-glfsr.asm
89 nasm $(DFLAGS) -f elf -o cipher-glfsr.o stub/cipher-glfsr.asm
90
91cipher-rc4.o: stub/cipher-rc4.c
92 $(CC) $(CFLAGS) -c stub/cipher-rc4.c -o cipher-rc4.o
93
94cipher-sha1.o: stub/cipher-sha1.c
95 $(CC) $(CFLAGS) -c stub/cipher-sha1.c -o cipher-sha1.o
96
97fingerprint.o: stub/fingerprint.c
98 $(CC) $(CFLAGS) -c stub/fingerprint.c -o fingerprint.o
99
100rs.o: stub/rs.c
101 $(CC) $(CFLAGS) -c stub/rs.c -o rs.o
102
103stub/stub.bin:
104 make -C stub rel=on $(MPASS) clean all
105
106
107# testing tool targets
108#
109
110fingerprint: stub/fingerprint.c cipher-sha1.o rs.o
111 $(CC) -DSTANDALONE $(CFLAGS) -o fingerprint \
112 stub/fingerprint.c rs.o cipher-sha1.o
113
114rstest: rstest.c rs.o
115 $(CC) $(CFLAGS) -o rstest rstest.c rs.o
116