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)