2 # Obtain the global build environment
5 include $(AP_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 install :: nlms $(INSTDIRS)
41 installdev :: $(INSTDEVDIRS)
49 endif #NO_LICENSE_FILE check
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)
65 @echo $(DL)Multiple targets can be used on a single nmake command line -$(DL)
66 @echo $(DL)(i.e. $(MAKE) clean all)$(DL)
68 @echo $(DL)You can also specify RELEASE=debug, RELEASE=noopt, or RELEASE=optimized$(DL)
69 @echo $(DL)The default is RELEASE=optimized$(DL)
71 clobber_all :: clean clobber_install clobber_prebuild
74 $(call RMDIR,$(INSTALL))
77 $(call RMDIR,$(PREBUILD_INST))
80 # build recursive targets
84 ifneq "$(MAKECMDGOALS)" "clean"
85 ifneq "$(findstring clobber_,$(MAKECMDGOALS))" "clobber_"
87 @echo $(DL)Building $(CURDIR)/$@$(DL)
90 $(MAKE) -C $@ $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(LM_LICENSE_FILE)"
100 @echo $(DL)Cleaning up $(CURDIR)$(DL)
101 $(call RMDIR,$(OBJDIR))