]> granicus.if.org Git - apache/blob - build/NWGNUhead.inc
mod_proxy: add ap_proxy_define_match_worker() and use it for ProxyPassMatch
[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         $(call MKDIR,$@)
45
46 $(INSTDEVDIRS) ::
47         $(call MKDIR,$@)
48
49 endif #NO_LICENSE_FILE check
50
51 help :
52         @echo $(DL)targets for RELEASE=$(RELEASE):$(DL)
53         @echo $(DL)(default) . . . . libs nlms$(DL)
54         @echo $(DL)all . . . . . . . does everything (libs nlms install)$(DL)
55         @echo $(DL)libs. . . . . . . builds all libs$(DL)
56         @echo $(DL)nlms. . . . . . . builds all nlms$(DL)
57         @echo $(DL)install . . . . . builds libs and nlms and copies install files to$(DL)
58         @echo $(DL)                  "$(INSTALL)"$(DL)
59         @echo $(DL)installdev. . . . copies headers and files needed for development to$(DL)
60         @echo $(DL)                  "$(INSTALL)"$(DL)
61         @echo $(DL)clean . . . . . . deletes $(OBJDIR) dirs, *.err, and *.map$(DL)
62         @echo $(DL)clobber_all . . . deletes all possible output from the make$(DL)
63         @echo $(DL)clobber_install . deletes all files in $(INSTALL)$(DL)
64         @$(ECHONL)
65         @echo $(DL)Multiple targets can be used on a single nmake command line -$(DL)
66         @echo $(DL)(i.e. $(MAKE) clean all)$(DL)
67         @$(ECHONL)
68         @echo $(DL)You can also specify RELEASE=debug, RELEASE=noopt, or RELEASE=optimized$(DL)
69         @echo $(DL)The default is RELEASE=optimized$(DL)
70
71 clobber_all :: clean clobber_install clobber_prebuild
72
73 clobber_install ::
74         $(call RMDIR,$(INSTALL))
75         
76 clobber_prebuild ::
77         $(call RMDIR,$(PREBUILD_INST))
78
79 #
80 # build recursive targets
81 #
82
83 $(SUBDIRS) : FORCE
84 ifneq "$(MAKECMDGOALS)" "clean"
85 ifneq "$(findstring clobber_,$(MAKECMDGOALS))" "clobber_"
86         @$(ECHONL)
87         @echo $(DL)Building $(CURDIR)/$@$(DL)
88 endif
89 endif
90         $(MAKE) -C $@ $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(LM_LICENSE_FILE)"
91         @$(ECHONL)
92
93 FORCE:
94
95 #
96 # Standard targets
97 #
98
99 clean :: $(SUBDIRS)
100         @echo $(DL)Cleaning up $(CURDIR)$(DL)
101         $(call RMDIR,$(OBJDIR))
102         $(call DEL,*.err)
103         $(call DEL,*.map)
104         $(call DEL,*.tmp)
105 #       $(call DEL,*.d)
106
107 $(OBJDIR) ::
108         $(call MKDIR,$@)
109