source: tags/cvs_2_svn/SL/Makefile

Last change on this file was 5228, checked in by westram, 16 years ago
  • chaged forwarded variables for new makefile
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1
2ARCHS_ALL = \
3        HELIX/HELIX.dummy  \
4        AW_HELIX/AW_HELIX.dummy  \
5        AW_NAME/AW_NAME.dummy  \
6        DB_SCANNER/DB_SCANNER.dummy  \
7        FILE_BUFFER/FILE_BUFFER.dummy  \
8
9# --------------------------------------------------------------------------------
10# If a package is available as debian package it should go here
11
12ARCHS_NON_DEBIAN = \
13
14# --------------------------------------------------------------------------------
15
16ifdef DEBIAN
17ARCHS = $(ARCHS_ALL) 
18else
19ARCHS = $(ARCHS_ALL) $(ARCHS_NON_DEBIAN)
20endif
21
22# --------------------------------------------------------------------------------
23# warnings in this subtree?
24
25RAISE_WARNINGS=1
26
27ifeq ($(RAISE_WARNINGS),1)
28SUB_CPP=$(CPP)
29SUB_ACC=$(ACC)
30else
31SUB_CPP=$(CPP:-W -Wall=-w)
32SUB_ACC=$(ACC:-W -Wall=-w)
33endif
34
35# --------------------------------------------------------------------------------
36
37$(MAIN): $(ARCHS)
38
39depends: $(ARCHS:.dummy=.depend)
40
41clean: $(ARCHS:.dummy=.clean)
42
43%.depend:
44        @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile
45        @$(MAKE) -C $(@D) -r \
46                "LD_LIBRARY_PATH  = ${LD_LIBRARY_PATH}" \
47                "MAKEDEPENDFLAGS = $(MAKEDEPENDFLAGS)" \
48                "MAKEDEPEND=$(MAKEDEPEND)" \
49                "ARBHOME=$(ARBHOME)" \
50                depends;
51        @grep "^# DO NOT DELETE" $(@D)/Makefile >/dev/null # check whether sub Makefile has dependencies
52        @cat $(@D)/Makefile \
53                | ../SOURCE_TOOLS/fix_depends.pl \
54                >$(@D)/Makefile.2
55        @mv $(@D)/Makefile.old $(@D)/Makefile # restore old Makefile
56        @$(ARBHOME)/SOURCE_TOOLS/mv_if_diff $(@D)/Makefile.2 $(@D)/Makefile # update Makefile if changed
57
58%.dummy:
59        @(($(MAKE) -C $(@D) -r \
60                "ACC = $(SUB_ACC)" \
61                "AINCLUDES = $(AINCLUDES)" \
62                "ARB  = yes" \
63                "ARBHOME = $(ARBHOME)" \
64                "CCPLIB = $(CCPLIB)" \
65                "CPP = $(SUB_CPP)" \
66                "CPPINCLUDES = $(CPPINCLUDES)" \
67                "LD_LIBRARY_PATH  = $(LD_LIBRARY_PATH)" \
68                "LIBPATH = $(LIBPATH)" \
69                "LINK_STATIC_LIB = $(LINK_STATIC_LIB)" \
70                "MAIN = $(@F:.dummy=.a)" \
71                "MAKE = $(MAKE)" \
72                "SHARED_LIB_SUFFIX = $(SHARED_LIB_SUFFIX)" \
73                "SYSLIBS = $(SYSLIBS)" \
74                "XHOME = $(XHOME)" \
75                "XLIBS = $(XLIBS)" \
76                "cflags = $(cflags) -DIN_ARB_$(@D:/=)" \
77                >$(@D).log 2>&1 && (cat $(@D).log;rm $(@D).log)) || (cat $(@D).log;rm $(@D).log;false))
78
79%.clean:
80        @$(MAKE) -C $(@D) \
81                "OPENGL=$(OPENGL)" \
82                clean
83
84# the end of the above command avoids that the output of parallel make calls gets mixed up
85
86# DO NOT DELETE
87
88# Do not add dependencies manually - use 'make depend' in $ARBHOME
89# For formatting issues see SOURCE_TOOLS/fix_depends.pl
Note: See TracBrowser for help on using the repository browser.