JPP_DIR := $(shell cd ../..; pwd) PACKAGE := jdb LINKDEF := LinkDef.hh INCLUDES := $(wildcard *.hh) ROOTCINTFLAGS += -I$(JDB_INCLUDE) CLASSDEFS := $(shell grep -l ClassDef $(INCLUDES)) CXXFLAGS += -I$(JDB_INCLUDE) LDFLAGS += -L$(JDB_LIB) LOADLIBES += $(JDB_LIBS) APIV2 := APIV2 include $(JPP_DIR)/make/JMakeROOTDictionary include $(JPP_DIR)/make/JMakefile $(LIBROOTso): $(DICTIONARY).o JRunQuality.o JDBToolkit.o JDBSupportkit.o libs: JDBTypes.hh JDBincludes.hh JDBTypes.hh: $(CLASSDEFS) @echo "Creating $@" @echo "#ifndef __JDB__JDBTypes__" > $@ @echo "#define __JDB__JDBTypes__" >> $@ @echo "" >> $@ @echo "/**" >> $@ @echo " * \file" >> $@ @echo " * This file is automatically created by make." >> $@ @echo " */" >> $@ @echo "" >> $@ @echo "namespace JDATABASE {" >> $@ @echo "" >> $@ @for file in $(CLASSDEFS); do \ awk 'NR==1,/$(APIV2)/ \ { if ($$0 ~ /ClassDef\(.*\)/) \ { printf( " struct %s;\n", gensub(/ *ClassDef\((.+),.*/, "\\1", 1, $$0)); }}' $${file} >> $@; \ done @echo "" >> $@ @echo " namespace APIV2 {" >> $@ @for file in $(CLASSDEFS); do \ awk '/$(APIV2)/,NR==999999999 \ { if ($$0 ~ /ClassDef\(.*\)/) \ { printf(" struct %s;\n", gensub(/ *ClassDef\((.+),.*/, "\\1", 1, $$0)); }}' $${file} >> $@; \ done @echo " }" >> $@ @echo "}" >> $@ @echo "#endif" >> $@ JDBincludes.hh: $(CLASSDEFS) @echo "Creating $@" @echo "/**" > $@ @echo " * \file" >> $@ @echo " * This file is automatically created by make." >> $@ @echo " */" >> $@ @echo "" >> $@ @for file in $(CLASSDEFS); do \ echo "#include \"JDB/$${file}\"" >> $@; \ done $(NATIVE_SRCS): JDBTypes.hh JAsciiDB.cc: JDBincludes.hh JConvertDB.cc: JDBincludes.hh clean:: $(RM) JDBTypes.hh JDBincludes.hh