X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=Makefile;h=2e5c1eea8323b4cac1b55e9933f8d22014c7baa6;hb=d631c517b6f5d38add6ad9ce9732f97ac3367959;hp=febebebbb4b397d244a2f36a93f96d9d87a36cbc;hpb=a8e2a47da8cf73db5b624b2640ad3eef06cf9030;p=xonotic%2Fgmqcc.git diff --git a/Makefile b/Makefile index febebeb..2e5c1ee 100644 --- a/Makefile +++ b/Makefile @@ -29,12 +29,13 @@ ifeq ($(CC), clang) -Wno-conversion \ -Wno-missing-prototypes \ -Wno-float-equal \ - -Wno-unknown-warning-option + -Wno-unknown-warning-option \ + -Wstrict-prototypes else #Tiny C Compiler doesn't know what -pedantic-errors is # and instead of ignoring .. just errors. ifneq ($(CC), tcc) - CFLAGS += -pedantic-errors + CFLAGS += -Wstrict-prototypes -pedantic-errors else CFLAGS += -Wno-pointer-sign -fno-common endif @@ -44,11 +45,17 @@ ifeq ($(track), no) CFLAGS += -DNOTRACK endif -OBJ_D = util.o code.o ast.o ir.o conout.o ftepp.o opts.o fs.o utf8.o correct.o -OBJ_P = util.o fs.o conout.o opts.o pak.o -OBJ_T = test.o util.o conout.o fs.o -OBJ_C = main.o lexer.o parser.o fs.o -OBJ_X = exec-standalone.o util.o conout.o fs.o +OBJ_D = util.o code.o ast.o ir.o conout.o ftepp.o opts.o fs.o utf8.o correct.o stat.o +OBJ_P = util.o fs.o conout.o opts.o pak.o stat.o +OBJ_T = test.o util.o conout.o fs.o stat.o +OBJ_C = main.o lexer.o parser.o fs.o stat.o +OBJ_X = exec-standalone.o util.o conout.o fs.o stat.o + +#we have duplicate object files when dealing with creating a simple list +#for dependinces. To combat this we use some clever recrusive-make to +#filter the list and remove duplicates which we use for make depend +RMDUP = $(if $1,$(firstword $1) $(call RMDUP,$(filter-out $(firstword $1),$1))) +DEPS := $(call RMDUP, $(OBJ_D) $(OBJ_P) $(OBJ_T) $(OBJ_C) $(OBJ_X)) ifneq ("$(CYGWIN)", "") #nullify the common variables that @@ -129,7 +136,6 @@ SPLINTFLAGS = \ -onlytrans \ -predboolint \ -boolops \ - -exportlocal \ -incondefs \ -macroredef \ -retvalint \ @@ -142,7 +148,6 @@ SPLINTFLAGS = \ -temptrans \ -usereleased \ -warnposix \ - -shiftimplementation \ +charindex \ -kepttrans \ -unqualifiedtrans \ @@ -156,8 +161,6 @@ SPLINTFLAGS = \ -mayaliasunique \ -realcompare \ -observertrans \ - -shiftnegative \ - -freshtrans \ -abstract \ -statictrans \ -castfcnptr @@ -203,15 +206,7 @@ gource-record: depend: @makedepend -Y -w 65536 2> /dev/null \ - $(subst .o,.c,$(OBJ_D)) - @makedepend -a -Y -w 65536 2> /dev/null \ - $(subst .o,.c,$(OBJ_T)) - @makedepend -a -Y -w 65536 2> /dev/null \ - $(subst .o,.c,$(OBJ_C)) - @makedepend -a -Y -w 65536 2> /dev/null \ - $(subst .o,.c,$(OBJ_X)) - @makedepend -a -Y -w 65536 2> /dev/null \ - $(subst .o,.c,$(OBJ_P)) + $(subst .o,.c,$(DEPS)) #install rules install: install-gmqcc install-qcvm install-gmqpak install-doc @@ -250,23 +245,9 @@ opts.o: gmqcc.h opts.def fs.o: gmqcc.h opts.def utf8.o: gmqcc.h opts.def correct.o: gmqcc.h opts.def - +stat.o: gmqcc.h opts.def +pak.o: gmqcc.h opts.def test.o: gmqcc.h opts.def -util.o: gmqcc.h opts.def -conout.o: gmqcc.h opts.def -fs.o: gmqcc.h opts.def - main.o: gmqcc.h opts.def lexer.h lexer.o: gmqcc.h opts.def lexer.h parser.o: gmqcc.h opts.def lexer.h ast.h ir.h intrin.h -fs.o: gmqcc.h opts.def - -util.o: gmqcc.h opts.def -conout.o: gmqcc.h opts.def -fs.o: gmqcc.h opts.def - -util.o: gmqcc.h opts.def -fs.o: gmqcc.h opts.def -conout.o: gmqcc.h opts.def -opts.o: gmqcc.h opts.def -pak.o: gmqcc.h opts.def