move preprocessor args into CPPFLAGS
This commit is contained in:
parent
803368a264
commit
850dafbbc9
10
Makefile
10
Makefile
@ -1,9 +1,9 @@
|
|||||||
ifneq ($(OS),Windows_NT)
|
ifneq ($(OS),Windows_NT)
|
||||||
DEFS = -D_POSIX_C_SOURCE=200112L
|
CPPFLAGS = -D_POSIX_C_SOURCE=200112L
|
||||||
endif
|
endif
|
||||||
CFLAGS = $(DEFS) -ggdb -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 = $(DEFS) -pg -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 = $(DEFS) -O3 -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
|
LDFLAGS = -lm
|
||||||
SOURCE = main.c util.c tok.c lex.c ir.c parse.c runtime.c vm.c map.c
|
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
|
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)
|
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) -c -o $@ $< $(CFLAGS)
|
$(CC) -c -o $@ $< $(CPPFLAGS) $(CFLAGS)
|
||||||
|
|
||||||
deps.mk: $(SOURCE) $(HEADERS)
|
deps.mk: $(SOURCE) $(HEADERS)
|
||||||
@echo "# Automatically generated by $(CC) -MM." > $@
|
@echo "# Automatically generated by $(CC) -MM." > $@
|
||||||
|
Loading…
Reference in New Issue
Block a user