blob: 410735c7363422aff95b1af80cbb8caa960503b3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
CC = clang
CFLAGS = -static -Oz -flto -ffreestanding -ffunction-sections -fdata-sections \
-Wl,--gc-sections -fno-unwind-tables -fno-asynchronous-unwind-tables \
-fno-ident -fmerge-all-constants
define build
$(CC) broadd.c -o $(1) $(CFLAGS) $(2)
strip --strip-all $(1)
upx --brute $(1)
endef
all: clean bt_log bt_sml bu_log bu_sml
clean:
rm -rf bin && mkdir bin
bt_log: ; $(call build, bin/tbroaddv, -DDEBUG=1)
bt_sml: ; $(call build, bin/tbroadd, -DDEBUG=0)
bu_log: ; $(call build, bin/ubroaddv, -DDEBUG=1 -DUDP=1)
bu_sml: ; $(call build, bin/ubroadd, -DDEBUG=0 -DUDP=1)
|