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)
44
$(CHKNOT) $@\NUL mkdir $@
47
$(CHKNOT) $@\NUL mkdir $@
49
endif #NO_LICENSE_FILE check
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
59
@echo installdev. . . . copies headers and files needed for development to
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)
65
@echo Multiple targets can be used on a single nmake command line -
66
@echo (i.e. $(MAKE) clean all)
68
@echo You can also specify RELEASE=debug, RELEASE=noopt, or RELEASE=optimized
69
@echo The default is RELEASE=optimized
71
clobber_all :: clean clobber_install clobber_prebuild
74
-$(DELTREE) $(INSTALL) 2>NUL
77
$(CHK) $(PREBUILD_INST)\*.* $(DEL) $(PREBUILD_INST)\*.*
78
-$(DELTREE) $(PREBUILD_INST) 2> NUL
81
# build recursive targets
85
ifneq "$(MAKECMDGOALS)" "clean"
87
@echo Building $(CURDIR)/$@
89
$(MAKE) -C $@ $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(LM_LICENSE_FILE)"
99
@echo Cleaning up $(CURDIR)
100
-$(DELTREE) $(OBJDIR) 2> NUL
101
$(CHK) *.err $(DEL) *.err
102
$(CHK) *.map $(DEL) *.map
103
$(CHK) *.d $(DEL) *.d
104
$(CHK) *.tmp $(DEL) *.tmp
105
$(CHK) xc.bat $(DEL) xc.bat
106
-$(DELTREE) $(OBJDIR) 2> NUL
109
$(CHKNOT) $(OBJDIR)\nul mkdir $(OBJDIR)