Add UPRINTF_CUSTOM_DIV_FUNC to Makefile

This commit is contained in:
Nikolay Puzanov 2025-01-28 09:19:58 +03:00
parent a3c69113f4
commit 2417d2068e

View File

@ -1,7 +1,14 @@
sources := test.c uprintf.c idiv.c
cflags := -std=c89 -Os -Wl,--no-warn-execstack
ifeq ($(CUSTOM_DIV_FUNC), 1)
cflags += -DUPRINTF_CUSTOM_DIV_FUNC
endif
all: test
test: test.c uprintf.c uprintf.h
gcc -std=c89 -Os -DUPRINTF_CUSTOM_DIV_FUNC -o test test.c uprintf.c idiv.c
gcc $(cflags) -o test $(sources)
clean:
rm -rf test