| 1 | |
|---|
| 2 | ARCHS_ALL = \ |
|---|
| 3 | glpng/libglpng_arb.dummy \ |
|---|
| 4 | glAW/libglAW.dummy \ |
|---|
| 5 | |
|---|
| 6 | # -------------------------------------------------------------------------------- |
|---|
| 7 | # If a package is available as debian package it should go here |
|---|
| 8 | |
|---|
| 9 | ARCHS_NON_DEBIAN = \ |
|---|
| 10 | |
|---|
| 11 | # -------------------------------------------------------------------------------- |
|---|
| 12 | |
|---|
| 13 | ifeq ($(DEBIAN),1) |
|---|
| 14 | ARCHS = $(ARCHS_ALL) |
|---|
| 15 | else |
|---|
| 16 | ARCHS = $(ARCHS_ALL) $(ARCHS_NON_DEBIAN) |
|---|
| 17 | endif |
|---|
| 18 | |
|---|
| 19 | # -------------------------------------------------------------------------------- |
|---|
| 20 | # warnings in this subtree? |
|---|
| 21 | |
|---|
| 22 | RAISE_WARNINGS=1# raise warnings in this subtree? |
|---|
| 23 | |
|---|
| 24 | ifeq ($(RAISE_WARNINGS),0) |
|---|
| 25 | # Disabling ALL warnings with -w is disencouraged (disables -Werror=specific-warning). |
|---|
| 26 | $(warning Warning: All compiler warnings were disabled in subtree GL. Doing so is not recommended!) |
|---|
| 27 | cflags:=$(cflags:-W -Wall=-w) |
|---|
| 28 | endif |
|---|
| 29 | |
|---|
| 30 | include $(ARBHOME)/SOURCE_TOOLS/export2sub |
|---|
| 31 | |
|---|
| 32 | # -------------------------------------------------------------------------------- |
|---|
| 33 | |
|---|
| 34 | $(MAIN): $(ARCHS) |
|---|
| 35 | |
|---|
| 36 | depends: $(ARCHS:.dummy=.depend) |
|---|
| 37 | |
|---|
| 38 | clean: $(ARCHS:.dummy=.clean) |
|---|
| 39 | |
|---|
| 40 | %.depend: |
|---|
| 41 | @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile |
|---|
| 42 | @$(MAKE) -C $(@D) -r depends |
|---|
| 43 | @grep "^# DO NOT DELETE" $(@D)/Makefile >/dev/null # check whether sub Makefile has dependencies |
|---|
| 44 | @cat $(@D)/Makefile \ |
|---|
| 45 | | ../SOURCE_TOOLS/fix_depends.pl "(from GL)" \ |
|---|
| 46 | >$(@D)/Makefile.2 |
|---|
| 47 | @mv $(@D)/Makefile.old $(@D)/Makefile # restore old Makefile |
|---|
| 48 | @$(ARBHOME)/SOURCE_TOOLS/mv_if_diff $(@D)/Makefile.2 $(@D)/Makefile # update Makefile if changed |
|---|
| 49 | |
|---|
| 50 | %.dummy: |
|---|
| 51 | @$(MAKE) -C $(@D) -r \ |
|---|
| 52 | "ARB = yes" \ |
|---|
| 53 | "MAIN = $(@F:.dummy=.a)" \ |
|---|
| 54 | "cflags = $(cflags) -DIN_ARB_$(@D:/=)" \ |
|---|
| 55 | |
|---|
| 56 | %.clean: |
|---|
| 57 | @$(MAKE) -C $(@D) \ |
|---|
| 58 | clean |
|---|
| 59 | |
|---|
| 60 | # DO NOT DELETE |
|---|
| 61 | |
|---|
| 62 | # Do not add dependencies manually - use 'make depend' in $ARBHOME |
|---|
| 63 | # For formatting issues see SOURCE_TOOLS/fix_depends.pl (from main) |
|---|