]> granicus.if.org Git - apache/blob - build/NWGNUhead.inc
Add support for an "epoch" in the RPM spec file. This epoch is a discrete
[apache] / build / NWGNUhead.inc
1 #
2 # Obtain the global build environment
3 #
4
5 include $(AP_WORK)\build\NWGNUenvironment.inc
6
7 #
8 # Define base targets and rules
9
10
11 TARGETS = libs nlms install clobber_libs clobber_nlms clean installdev
12
13 .PHONY : $(TARGETS) default all help $(NO_LICENSE_FILE)
14
15 # Here is where we will use the NO_LICENSE_FILE variable to see if we need to
16 # restart the make with it defined
17
18 ifdef NO_LICENSE_FILE
19
20 default: NO_LICENSE_FILE
21
22 all: NO_LICENSE_FILE
23
24 install :: NO_LICENSE_FILE
25
26 installdev :: NO_LICENSE_FILE
27
28 NO_LICENSE_FILE :
29         $(MAKE) $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(METROWERKS)\license.dat"
30
31 else # LM_LICENSE_FILE must be defined so use the real targets
32
33 default: $(SUBDIRS) libs nlms
34
35 all: $(SUBDIRS) libs nlms install
36
37 $(TARGETS) :: $(SUBDIRS)
38
39 install :: nlms $(INSTDIRS)
40
41 installdev :: $(INSTDEVDIRS)
42
43 $(INSTDIRS) ::
44         $(CHKNOT) $@\NUL mkdir $@
45
46 $(INSTDEVDIRS) ::
47         $(CHKNOT) $@\NUL mkdir $@
48
49 endif #NO_LICENSE_FILE check
50
51 help :
52         @echo targets for RELEASE=$(RELEASE):
53         @echo (default) . . . . libs nlms
54         @echo all . . . . . . . does everything (libs nlms install)
55         @echo libs. . . . . . . builds all libs
56         @echo nlms. . . . . . . builds all nlms
57         @echo install . . . . . builds libs and nlms and copies install files to
58         @echo                   "$(INSTALL)"
59         @echo installdev. . . . copies headers and files needed for development to
60         @echo                   "$(INSTALL)"
61         @echo clean . . . . . . deletes $(OBJDIR) dirs, *.err, and *.map
62         @echo clobber_all . . . deletes all possible output from the make
63         @echo clobber_install . deletes all files in $(INSTALL)
64         @$(CMD) echo.
65         @echo Multiple targets can be used on a single nmake command line -
66         @echo (i.e. $(MAKE) clean all)
67         @$(CMD) echo.
68         @echo You can also specify RELEASE=debug, RELEASE=noopt, or RELEASE=optimized
69         @echo The default is RELEASE=optimized
70
71 clobber_all :: clean clobber_install clobber_prebuild
72
73 clobber_install ::
74         -$(DELTREE) $(INSTALL) 2>NUL
75         
76 clobber_prebuild ::
77         $(CHK) $(PREBUILD_INST)\*.* $(DEL) $(PREBUILD_INST)\*.*
78         -$(DELTREE) $(PREBUILD_INST) 2> NUL
79
80 #
81 # build recursive targets
82 #
83
84 $(SUBDIRS) : FORCE
85 ifneq "$(MAKECMDGOALS)" "clean"
86         $(CMD) echo.
87         @echo Building $(CURDIR)/$@
88 endif
89         $(MAKE) -C $@ $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(LM_LICENSE_FILE)"
90         $(CMD) echo.
91
92 FORCE:
93
94 #
95 # Standard targets
96 #
97
98 clean :: $(SUBDIRS)
99         @echo Cleaning up $(CURDIR)
100         -$(DELTREE) $(OBJDIR) 2> NUL
101         $(CHK) *.err $(DEL) *.err
102         $(CHK) *.map $(DEL) *.map
103         $(CHK) *.dep $(DEL) *.dep
104         $(CHK) *.tmp $(DEL) *.tmp
105         $(CHK) xc.bat $(DEL) xc.bat
106         -$(DELTREE) $(OBJDIR) 2> NUL
107
108 $(OBJDIR) ::
109         $(CHKNOT) $(OBJDIR)\nul mkdir $(OBJDIR)
110