| 1 | |
|---|
| 2 | ARCHS_ALL = \ |
|---|
| 3 | TREE_READ/TREE_READ.dummy \ |
|---|
| 4 | TREE_WRITE/TREE_WRITE.dummy \ |
|---|
| 5 | HELIX/HELIX.dummy \ |
|---|
| 6 | AW_HELIX/AW_HELIX.dummy \ |
|---|
| 7 | AW_NAME/AW_NAME.dummy \ |
|---|
| 8 | DB_SCANNER/DB_SCANNER.dummy \ |
|---|
| 9 | FILE_BUFFER/FILE_BUFFER.dummy \ |
|---|
| 10 | REGEXPR/REGEXPR.dummy \ |
|---|
| 11 | FAST_ALIGNER/FAST_ALIGNER.dummy \ |
|---|
| 12 | |
|---|
| 13 | # -------------------------------------------------------------------------------- |
|---|
| 14 | # If a package is available as debian package it should go here |
|---|
| 15 | |
|---|
| 16 | ARCHS_NON_DEBIAN = \ |
|---|
| 17 | |
|---|
| 18 | # -------------------------------------------------------------------------------- |
|---|
| 19 | |
|---|
| 20 | ifdef DEBIAN |
|---|
| 21 | ARCHS = $(ARCHS_ALL) |
|---|
| 22 | else |
|---|
| 23 | ARCHS = $(ARCHS_ALL) $(ARCHS_NON_DEBIAN) |
|---|
| 24 | endif |
|---|
| 25 | |
|---|
| 26 | # -------------------------------------------------------------------------------- |
|---|
| 27 | # warnings in this subtree? |
|---|
| 28 | |
|---|
| 29 | RAISE_WARNINGS=1 |
|---|
| 30 | |
|---|
| 31 | ifeq ($(RAISE_WARNINGS),0) |
|---|
| 32 | CPP:=$(CPP:-W -Wall=-w) |
|---|
| 33 | ACC:=$(ACC:-W -Wall=-w) |
|---|
| 34 | endif |
|---|
| 35 | |
|---|
| 36 | include $(ARBHOME)/SOURCE_TOOLS/export2sub |
|---|
| 37 | |
|---|
| 38 | # -------------------------------------------------------------------------------- |
|---|
| 39 | |
|---|
| 40 | $(MAIN): $(ARCHS) |
|---|
| 41 | |
|---|
| 42 | depends: $(ARCHS:.dummy=.depend) |
|---|
| 43 | |
|---|
| 44 | clean: $(ARCHS:.dummy=.clean) |
|---|
| 45 | |
|---|
| 46 | %.depend: |
|---|
| 47 | @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile |
|---|
| 48 | @$(MAKE) -C $(@D) -r depends |
|---|
| 49 | @grep "^# DO NOT DELETE" $(@D)/Makefile >/dev/null # check whether sub Makefile has dependencies |
|---|
| 50 | @cat $(@D)/Makefile \ |
|---|
| 51 | | ../SOURCE_TOOLS/fix_depends.pl \ |
|---|
| 52 | >$(@D)/Makefile.2 |
|---|
| 53 | @mv $(@D)/Makefile.old $(@D)/Makefile # restore old Makefile |
|---|
| 54 | @$(ARBHOME)/SOURCE_TOOLS/mv_if_diff $(@D)/Makefile.2 $(@D)/Makefile # update Makefile if changed |
|---|
| 55 | |
|---|
| 56 | %.dummy: |
|---|
| 57 | @(($(MAKE) -C $(@D) -r \ |
|---|
| 58 | "ARB = yes" \ |
|---|
| 59 | "MAIN = $(@F:.dummy=.a)" \ |
|---|
| 60 | "cflags = $(cflags) -DIN_ARB_$(@D:/=)" \ |
|---|
| 61 | >$(@D).log 2>&1 && (cat $(@D).log;rm $(@D).log)) || (cat $(@D).log;rm $(@D).log;false)) |
|---|
| 62 | |
|---|
| 63 | %.clean: |
|---|
| 64 | @$(MAKE) -C $(@D) \ |
|---|
| 65 | clean |
|---|
| 66 | |
|---|
| 67 | # the end of the above command avoids that the output of parallel make calls gets mixed up |
|---|
| 68 | |
|---|
| 69 | # DO NOT DELETE |
|---|
| 70 | |
|---|
| 71 | # Do not add dependencies manually - use 'make depend' in $ARBHOME |
|---|
| 72 | # For formatting issues see SOURCE_TOOLS/fix_depends.pl |
|---|