From 2417d2068e35dbfb39868b48ca46e7bda9f69944 Mon Sep 17 00:00:00 2001 From: Nikolay Puzanov Date: Tue, 28 Jan 2025 09:19:58 +0300 Subject: [PATCH] Add UPRINTF_CUSTOM_DIV_FUNC to Makefile --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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