diff options
-rw-r--r-- | config.mk | 27 | ||||
-rw-r--r-- | obj/genfiles/.gitignore | 1 | ||||
-rw-r--r-- | src/build/linker/makefile | 6 |
3 files changed, 27 insertions, 7 deletions
@@ -1,17 +1,22 @@ -all: ALL ${EXTRA_PARTS} +all: + ${MAKE} gen_pass + ${MAKE} code_pass ifdef MODULE OBJDIR = ${ROOTPATH}/obj/modules/${MODULE} BEAMDIR = ${ROOTPATH}/obj/beam/${MODULE} +GENDIR = ${ROOTPATH}/obj/genfiles/ IMGDIR = ${ROOTPATH}/img EXTRACOMMONFLAGS += -fPIC -Bsymbolic -Bsymbolic-functions LIBS += $(addsuffix .so, $(addprefix lib, ${MODULE})) MODULE_INIT = ${ROOTPATH}/obj/core/module_init.o -EXTRAINCDIR += ${ROOTPATH}/src/include/usr +EXTRAINCDIR += ${ROOTPATH}/src/include/usr ${GENDIR} else OBJDIR = ${ROOTPATH}/obj/core BEAMDIR = ${ROOTPATH}/obj/beam/core +GENDIR = ${ROOTPATH}/obj/genfiles/ IMGDIR = ${ROOTPATH}/img +EXTRAINCDIR += ${GENDIR} endif TRACEPP = ${ROOTPATH}/src/build/trace/tracepp @@ -170,7 +175,10 @@ ${IMGDIR}/hbotStringFile : ${IMAGES} ${ROOTPATH}/src/build/trace/tracehash_hb.pl -c -d ${ROOTPATH}/obj -s $@ %.d: ${OBJECTS} - cd ${basename $@} && ${MAKE} all + cd ${basename $@} && ${MAKE} code_pass + +%.gen_pass: + cd ${basename $@} && ${MAKE} gen_pass %.clean: cd ${basename $@} && ${MAKE} clean @@ -178,11 +186,18 @@ ${IMGDIR}/hbotStringFile : ${IMAGES} %.beamdir: cd ${basename $@} && ${MAKE} beam -ALL: ${OBJECTS} ${SUBDIRS} ${LIBRARIES} ${EXTRA_LIDS_} +code_pass: ${OBJECTS} ${SUBDIRS} ${LIBRARIES} ${EXTRA_LIDS_} ${EXTRA_PARTS} ifdef IMAGES ${MAKE} ${IMAGES} ${IMAGE_EXTRAS} endif +gen_pass: + mkdir -p ${GENDIR} + ${MAKE} GEN_PASS + +_GENFILES = $(addprefix ${GENDIR}/, ${GENFILES}) +GEN_PASS: ${_GENFILES} ${SUBDIRS:.d=.gen_pass} + ${BEAMDIR}/%.beam : %.C mkdir -p ${BEAMDIR} ${BEAMCMD} -I ${INCDIR} ${CXXFLAGS} ${BEAMFLAGS} $< \ @@ -205,9 +220,9 @@ clean: ${SUBDIRS:.d=.clean} ${IMAGES} ${IMAGES:.bin=.list} ${IMAGES:.bin=.syms} \ ${IMAGES:.bin=.bin.modinfo} ${IMAGES:.ruhx=.lid} \ ${IMAGES:.ruhx=.lidhdr} ${IMAGE_EXTRAS} ${EXTRA_LIDS_} \ - ${EXTRA_OBJS}) + ${EXTRA_OBJS} ${_GENFILES}) -cscope: ALL +cscope: code_pass mkdir -p ${ROOTPATH}/obj/cscope (cd ${ROOTPATH}/obj/cscope ; rm -f cscope.* ; \ find ../../ -name '*.[CHchS]' -type f -fprint cscope.files; \ diff --git a/obj/genfiles/.gitignore b/obj/genfiles/.gitignore new file mode 100644 index 000000000..72e8ffc0d --- /dev/null +++ b/obj/genfiles/.gitignore @@ -0,0 +1 @@ +* diff --git a/src/build/linker/makefile b/src/build/linker/makefile index 02789ef10..88f2a5fa0 100644 --- a/src/build/linker/makefile +++ b/src/build/linker/makefile @@ -1,7 +1,11 @@ linker: linker.C i686-mcp6-g++ -O3 -g linker.C -o linker -lbfd -liberty -lz -all: linker +all: code_pass + +code_pass: linker + +gen_pass: clean: (rm -f linker) |