diff options
Diffstat (limited to 'src/usr/errl/parser/makefile')
-rw-r--r-- | src/usr/errl/parser/makefile | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/usr/errl/parser/makefile b/src/usr/errl/parser/makefile index 8b91e14ab..41c5df796 100644 --- a/src/usr/errl/parser/makefile +++ b/src/usr/errl/parser/makefile @@ -21,17 +21,14 @@ # # IBM_PROLOG_END - # makefile for errlparser, # a 32-bit x86 linux binary suitable for running on GFW pool machines. - ROOTPATH=../../../.. -GENDIR = ${ROOTPATH}/obj/genfiles -IMGDIR = ${ROOTPATH}/img +include ${ROOTPATH}/src/usr/parser.mk -OBJDIR = ${ROOTPATH}/obj/modules/errlparser +OBJFILES = errlparserbase.o errlusrparser.o SRCPARSE_HEADER_TARGET = \ ${GENDIR}/hostBootSrcParse.H @@ -39,40 +36,47 @@ SRCPARSE_HEADER_TARGET = \ CC=i686-mcp6-g++ -m32 CFLAGS:=-g -O0 -I $(ROOTPATH)/src/include/usr -D PARSER - all: gen_pass code_pass gen_pass: code_pass: makeobjdir ${IMGDIR}/errlparser ${SRCPARSE_HEADER_TARGET} +## errlparserbase and errlusrparser +%.o : %.C + $(CC) -c $(CFLAGS) -o $@ $< + clean: rm -fr ${SRCPARSE_HEADER_TARGET} rm -fr ${OBJDIR}/errlparser.o rm -fr ${GENDIR}/errlparser rm -fr ${GENDIR}/comps.C - -beam: - + rm -fr ${OBJDIR}/*.o + rm -fr *.o makeobjdir: mkdir -p ${OBJDIR} -${GENDIR}/comps.C: $(ROOTPATH)/src/include/usr/hbotcompid.H +${GENDIR}/comps.C: ${ROOTPATH}/src/include/usr/hbotcompid.H grep "const compId_t [A-Z0-9]*_COMP_ID" $^ | \ grep -v MY_COMP_ID | \ sed 's/const compId_t \([A-Z0-9]*\)_COMP_ID[ =\t]*\(0[xX][0-9a-fA-F]*\).*/{ "\1", \2 },/' \ > $@ -${OBJDIR}/errlparser.o: errlparser.C $(ROOTPATH)/src/include/usr/errl/errltypes.H ${GENDIR}/comps.C \ - ${SRCPARSE_HEADER_TARGET} +${OBJDIR}/errlparser.o: errlparser.C ${ROOTPATH}/src/include/usr/errl/errltypes.H ${GENDIR}/comps.C ${SRCPARSE_HEADER_TARGET} $(CC) -c $(CFLAGS) -I${ROOTPATH}/obj/genfiles -o $@ $< -${IMGDIR}/errlparser: ${OBJDIR}/errlparser.o - $(CC) -o $@ $< +${IMGDIR}/errlparser: ${OBJDIR}/errlparser.o ${OBJFILES} ${UD_FILES} + $(CC) -o $@ $? + +## TODO add link step to link in UD_FILES ${SRCPARSE_HEADER_TARGET} : ./scanforsrcs.pl -b ${ROOTPATH} -o ${GENDIR} - +debug: + ls -l ${GENDIR} + ls -l ${OBJDIR} + ls -l ${IMGDIR} + ls -l ${UD_DIR} |