diff --git a/Makefile b/Makefile index 756a3a1..c820b86 100644 --- a/Makefile +++ b/Makefile @@ -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