From 850dafbbc939cfb2be477577cb362b1bb26a3bad Mon Sep 17 00:00:00 2001 From: r4 Date: Sat, 25 Dec 2021 22:32:16 +0100 Subject: [PATCH] move preprocessor args into CPPFLAGS --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6164d5b..a0682a9 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ ifneq ($(OS),Windows_NT) - DEFS = -D_POSIX_C_SOURCE=200112L +CPPFLAGS = -D_POSIX_C_SOURCE=200112L endif -CFLAGS = $(DEFS) -ggdb -std=c11 -Wall -Wextra -pedantic -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -#CFLAGS = $(DEFS) -pg -std=c11 -Wall -Wextra -pedantic -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -#CFLAGS = $(DEFS) -O3 -std=c11 -Wall -Wextra -pedantic -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition +CFLAGS = -ggdb -std=c11 -Wall -Wextra -pedantic -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition +#CFLAGS = -pg -std=c11 -Wall -Wextra -pedantic -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition +#CFLAGS = -O3 -std=c11 -Wall -Wextra -pedantic -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition LDFLAGS = -lm SOURCE = main.c util.c tok.c lex.c ir.c parse.c runtime.c vm.c map.c HEADERS = util.h tok.h lex.h ir.h parse.h runtime.h vm.h map.h @@ -15,7 +15,7 @@ $(EXE): $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) %.o: %.c - $(CC) -c -o $@ $< $(CFLAGS) + $(CC) -c -o $@ $< $(CPPFLAGS) $(CFLAGS) deps.mk: $(SOURCE) $(HEADERS) @echo "# Automatically generated by $(CC) -MM." > $@