source: trunk/GL/Makefile

Last change on this file was 19447, checked in by westram, 16 months ago
  • suppression of warnings for source-subtrees:
    • comment + warn when suppressed (currently suppressed in GDE)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1
2ARCHS_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
9ARCHS_NON_DEBIAN = \
10
11# --------------------------------------------------------------------------------
12
13ifeq ($(DEBIAN),1)
14ARCHS = $(ARCHS_ALL)
15else
16ARCHS = $(ARCHS_ALL) $(ARCHS_NON_DEBIAN)
17endif
18
19# --------------------------------------------------------------------------------
20# warnings in this subtree?
21
22RAISE_WARNINGS=1# raise warnings in this subtree?
23
24ifeq ($(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!)
27cflags:=$(cflags:-W -Wall=-w)
28endif
29
30include $(ARBHOME)/SOURCE_TOOLS/export2sub
31
32# --------------------------------------------------------------------------------
33
34$(MAIN): $(ARCHS)
35
36depends: $(ARCHS:.dummy=.depend)
37
38clean: $(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)
Note: See TracBrowser for help on using the repository browser.