diff options
-rw-r--r-- | config.mk | 6 | ||||
-rw-r--r-- | src/usr/hwpf/makefile | 24 |
2 files changed, 16 insertions, 14 deletions
@@ -28,7 +28,7 @@ all: ifdef MODULE OBJDIR = ${ROOTPATH}/obj/modules/${MODULE} BEAMDIR = ${ROOTPATH}/obj/beam/${MODULE} -GENDIR = ${ROOTPATH}/obj/genfiles/ +GENDIR = ${ROOTPATH}/obj/genfiles IMGDIR = ${ROOTPATH}/img EXTRACOMMONFLAGS += -fPIC -Bsymbolic -Bsymbolic-functions ifdef STRICT @@ -41,7 +41,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr ${GENDIR} else OBJDIR = ${ROOTPATH}/obj/core BEAMDIR = ${ROOTPATH}/obj/beam/core -GENDIR = ${ROOTPATH}/obj/genfiles/ +GENDIR = ${ROOTPATH}/obj/genfiles IMGDIR = ${ROOTPATH}/img EXTRAINCDIR += ${GENDIR} endif @@ -231,6 +231,8 @@ gen_pass: _GENFILES = $(addprefix ${GENDIR}/, ${GENFILES}) GEN_PASS: ${_GENFILES} ${SUBDIRS:.d=.gen_pass} +GENTARGET = $(addprefix %/, $(1)) + ${BEAMDIR}/%.beam : %.C mkdir -p ${BEAMDIR} ${BEAMCMD} -I ${INCDIR} ${CXXFLAGS} ${BEAMFLAGS} $< \ diff --git a/src/usr/hwpf/makefile b/src/usr/hwpf/makefile index 499041e24..48f46c401 100644 --- a/src/usr/hwpf/makefile +++ b/src/usr/hwpf/makefile @@ -23,21 +23,21 @@ ROOTPATH = ../../.. MODULE = hwpf -GENFILES = gen_errfiles fapiAttributeIds.H +FAPI_ERROR_TARGETS = fapiHwpReturnCodes.H fapiCollectFfdc.C \ + fapiErrorInfoMemInit.C +FAPI_ATTR_TARGETS = fapiAttributeIds.H +GENFILES = ${FAPI_ERROR_TARGETS} ${FAPI_ATTR_TARGETS} SUBDIRS = fapi.d hwp.d plat.d test.d include ${ROOTPATH}/config.mk -# fapiParseErrorInfo.pl produces multiple output files. Use a dummy target to -# create a single rule to create all files so that the script is only run once -# (instead of once for each output file which could fail in a parallel build). -# The disadvantage is that the script is always run, even if there are no -# updates, but it is safe and there is no easy solution -${GENDIR}/gen_errfiles : fapi/fapiParseErrorInfo.pl hwp/fapiHwpErrorInfo.xml - $< ${GENDIR} $(filter-out $<,$^) +# fapiParseErrorInfo.pl produces multiple output files: FAPI_ERROR_TARGETS +$(call GENTARGET, $(FAPI_ERROR_TARGETS)) : \ + fapi/fapiParseErrorInfo.pl hwp/fapiHwpErrorInfo.xml + $< $(dir $@) $(filter-out $<,$^) -# fapiParseAttributeInfo.pl produces a single output file so a standard rule -# will work -${GENDIR}/fapiAttributeIds.H : fapi/fapiParseAttributeInfo.pl hwp/fapiHwpAttributeInfo.xml - $< ${GENDIR} $(filter-out $<,$^) +# fapiParseAttributeInfo.pl produces a single output file: FAPI_ATTR_TARGETS +$(call GENTARGET, $(FAPI_ATTR_TARGETS)) : \ + fapi/fapiParseAttributeInfo.pl hwp/fapiHwpAttributeInfo.xml + $< $(dir $@) $(filter-out $<,$^) |