From e3013e615d9ce0ab1047968c4be87e35a10a108c Mon Sep 17 00:00:00 2001 From: David Holm Date: Sat, 29 Dec 2018 12:22:31 +0100 Subject: [PATCH 1/2] makefile: Set DFLAG before reference Set the value of `DFLAG` to the include paths before it is being referenced by `CFLAG`. --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 8dcfe03..c3a12f5 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ VPATH = ./:./support/minimig:./support/sharpmz:./support/archie:./support/st:./s OBJ = $(SRC:.c=.o) $(SRC2:.cpp=.o) $(MINIMIG_SRC:.cpp=.o) $(SHARPMZ_SRC:.cpp=.o) $(ARCHIE_SRC:.cpp=.o) $(ST_SRC:.cpp=.o) $(X86_SRC:.cpp=.o) $(SNES_SRC:.cpp=.o) DEP = $(SRC:.c=.d) $(SRC2:.cpp=.d) $(MINIMIG_SRC:.cpp=.d) $(SHARPMZ_SRC:.cpp=.d) $(ARCHIE_SRC:.cpp=.d) $(ST_SRC:.cpp=.d) $(X86_SRC:.cpp=.d) $(SNES_SRC:.cpp=.d) +DFLAGS = $(INCLUDE) CFLAGS = $(DFLAGS) -c -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DVDATE=\"`date +"%y%m%d"`\" LFLAGS = -lc -lstdc++ -lrt From febb7f444f51f358b147c13e94c15b1ecefb2203 Mon Sep 17 00:00:00 2001 From: David Holm Date: Sat, 29 Dec 2018 12:23:32 +0100 Subject: [PATCH 2/2] makefile: Enable all compiler diagnostics Enable all diagnostics in the compiler so that it can help identify bugs in the code during build. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c3a12f5..fb5c97f 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ OBJ = $(SRC:.c=.o) $(SRC2:.cpp=.o) $(MINIMIG_SRC:.cpp=.o) $(SHARPMZ_SRC:.cpp=.o) DEP = $(SRC:.c=.d) $(SRC2:.cpp=.d) $(MINIMIG_SRC:.cpp=.d) $(SHARPMZ_SRC:.cpp=.d) $(ARCHIE_SRC:.cpp=.d) $(ST_SRC:.cpp=.d) $(X86_SRC:.cpp=.d) $(SNES_SRC:.cpp=.d) DFLAGS = $(INCLUDE) -CFLAGS = $(DFLAGS) -c -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DVDATE=\"`date +"%y%m%d"`\" +CFLAGS = $(DFLAGS) -Wall -Wextra -c -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DVDATE=\"`date +"%y%m%d"`\" LFLAGS = -lc -lstdc++ -lrt $(PRJ): $(OBJ)