2 # Obtain the global build environment
5 include $(APR_WORK)\build\NWGNUenvironment.inc
8 # Define base targets and rules
11 TARGETS = libs nlms install clobber_libs clobber_nlms clean installdev
13 .PHONY : $(TARGETS) default all help $(NO_LICENSE_FILE)
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
20 default: NO_LICENSE_FILE
24 install :: NO_LICENSE_FILE
26 installdev :: NO_LICENSE_FILE
29 $(MAKE) $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(METROWERKS)\license.dat"
31 else # LM_LICENSE_FILE must be defined so use the real targets
33 default: $(SUBDIRS) libs nlms
35 all: $(SUBDIRS) libs nlms install
37 $(TARGETS) :: $(SUBDIRS)
39 endif #NO_LICENSE_FILE check
42 @echo targets for RELEASE=$(RELEASE):
43 @echo (default) . . . . libs nlms
44 @echo all . . . . . . . does everything (libs nlms install)
45 @echo libs. . . . . . . builds all libs
46 @echo nlms. . . . . . . builds all nlms
47 @echo install . . . . . builds libs and nlms and copies install files to
49 @echo installdev. . . . copies headers and files needed for development to
51 @echo clean . . . . . . deletes $(OBJDIR) dirs, *.err, and *.map
52 @echo clobber_all . . . deletes all possible output from the make
53 @echo clobber_install . deletes all files in $(INSTALL)
55 @echo Multiple targets can be used on a single nmake command line -
56 @echo (i.e. $(MAKE) clean all)
58 @echo You can also specify RELEASE=debug, RELEASE=noopt, or RELEASE=optimized
59 @echo The default is RELEASE=optimized
61 clobber_all :: clean clobber_install
64 -$(DELTREE) $(INSTALL) 2>NUL
67 # build recursive targets
71 ifneq "$(MAKECMDGOALS)" "clean"
73 @echo Building $(CURDIR)/$@
75 $(MAKE) -C $@ $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(LM_LICENSE_FILE)"
85 @echo Cleaning up $(CURDIR)
86 -$(DELTREE) $(OBJDIR) 2> NUL
87 $(CHK) *.err $(DEL) *.err
88 $(CHK) *.map $(DEL) *.map
90 $(CHK) *.tmp $(DEL) *.tmp
91 $(CHK) xc.bat $(DEL) xc.bat
92 -$(DELTREE) $(OBJDIR) 2> NUL
95 $(CHKNOT) $(OBJDIR)\nul mkdir $(OBJDIR)