mirror of https://github.com/ipxe/ipxe.git
Use mkconfig.pl to generate fragments from config.h
Don't use -MP to generate phony rules for included files, otherwise make won't use the pattern rule for config/%.h. :(pull/1/head
parent
a107996c9a
commit
b79895c9d6
|
@ -50,6 +50,11 @@ oldgas :
|
||||||
#
|
#
|
||||||
CFLAGS += -include compiler.h
|
CFLAGS += -include compiler.h
|
||||||
|
|
||||||
|
# config/%.h files are generated from config.h using mkconfig.pl
|
||||||
|
config/%.h : config.h
|
||||||
|
$(MKCONFIG) $<
|
||||||
|
CLEANUP += config/*.h
|
||||||
|
|
||||||
# SRCDIRS lists all directories containing source files.
|
# SRCDIRS lists all directories containing source files.
|
||||||
srcdirs :
|
srcdirs :
|
||||||
@echo $(SRCDIRS)
|
@echo $(SRCDIRS)
|
||||||
|
@ -104,8 +109,7 @@ endef
|
||||||
define obj_template
|
define obj_template
|
||||||
|
|
||||||
@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) \
|
@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) \
|
||||||
-M $(1) -MT "$(4)_DEPS" -MG -MP | \
|
-M $(1) -MT "$(4)_DEPS" -MG | tr : = >> $(2)
|
||||||
sed 's/$(4)_DEPS[[:space:]]*:/$(4)_DEPS =/' >> $(2)
|
|
||||||
@echo -e '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
|
@echo -e '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
|
||||||
'\n\t$$(RULE_$(3))\n' \
|
'\n\t$$(RULE_$(3))\n' \
|
||||||
'\nBOBJS += $$(BIN)/$(4).o\n' \
|
'\nBOBJS += $$(BIN)/$(4).o\n' \
|
||||||
|
|
Loading…
Reference in New Issue