mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-22 02:31:28 +00:00
Fix deps (remove duplicates with clever make tricks)
This commit is contained in:
parent
3d115760a0
commit
721b581376
1 changed files with 8 additions and 25 deletions
33
Makefile
33
Makefile
|
@ -50,6 +50,12 @@ 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
|
||||
|
||||
#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
|
||||
#most *nix systems have (for windows)
|
||||
|
@ -203,15 +209,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 +248,8 @@ opts.o: gmqcc.h opts.def
|
|||
fs.o: gmqcc.h opts.def
|
||||
utf8.o: gmqcc.h opts.def
|
||||
correct.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
|
||||
|
|
Loading…
Reference in a new issue