File indexing completed on 2024-04-06 11:57:57
0001
0002
0003
0004 modules=$*
0005
0006 function makegen
0007 {
0008 mod=$1
0009 cat >> gen.mk <<EOF
0010
0011
0012 FILES :=
0013 DICTFILES :=
0014
0015
0016 -include \$(patsubst %, %/module.mk,${mod})
0017
0018
0019 SRC += \$(patsubst %,${mod}/%,\$(FILES))
0020
0021
0022 DICTH_${mod} := \$(foreach i, \$(patsubst %,${mod}/%,\$(DICTFILES)), \$(wildcard \$(i).h) \$(wildcard \$(i).hh))
0023
0024 ifneq (\$(DICTH_${mod}),)
0025 SRC += ${mod}/\$(PKGNAME)_dict_${mod}
0026 endif
0027
0028 PROG += \$(patsubst %,\$(BINDIR)/%,\$(PROGRAMS))
0029
0030
0031 PROGSRC += \$(patsubst %,${mod}/%,\$(PROGRAMS))
0032
0033
0034
0035
0036 __dummy := \$(shell mkdir -p \$(DEPDIR)/${mod} \$(OBJDIR)/${mod})
0037
0038
0039 \$(BINDIR)/%: ${mod}/%
0040 cp \$^ \$@
0041
0042
0043
0044
0045 \$(BINDIR)/%: ${mod}/bin/%
0046 cp \$^ \$@
0047
0048 \$(BINDIR)/%: \${OBJDIR}/${mod}/%.bin
0049 cp \$^ \$@
0050
0051 EOF
0052 }
0053
0054 function makedictgen
0055 {
0056 mod=$1
0057 cat >> dictgen.mk <<EOF
0058 ${mod}/\$(PKGNAME)_dict_${mod}.cc: \$(DICTH_${mod})
0059 @echo "Generating dictionary \$@..."
0060 @\$(ROOTCINT) -f \$@ -c \$(filter -I% -D%,\$(CXXFLAGS)) \$^
0061 EOF
0062 }
0063
0064
0065 rm -f gen.mk dictgen.mk
0066
0067 for i in $modules; do
0068 makegen $i
0069 makedictgen $i
0070 done
0071