NWGNUhead.inc 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #
  2. # Obtain the global build environment
  3. #
  4. include $(APR_WORK)/build/NWGNUenvironment.inc
  5. #
  6. # Define base targets and rules
  7. #
  8. TARGETS = libs nlms install clobber_libs clobber_nlms clean installdev
  9. .PHONY : $(TARGETS) default all help $(NO_LICENSE_FILE)
  10. # Here is where we will use the NO_LICENSE_FILE variable to see if we need to
  11. # restart the make with it defined
  12. ifdef NO_LICENSE_FILE
  13. default: NO_LICENSE_FILE
  14. all: NO_LICENSE_FILE
  15. install :: NO_LICENSE_FILE
  16. installdev :: NO_LICENSE_FILE
  17. NO_LICENSE_FILE :
  18. $(MAKE) $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(METROWERKS)/license.dat"
  19. else # LM_LICENSE_FILE must be defined so use the real targets
  20. default: $(SUBDIRS) libs nlms
  21. all: $(SUBDIRS) libs nlms install
  22. $(TARGETS) :: $(SUBDIRS)
  23. endif #NO_LICENSE_FILE check
  24. help :
  25. @echo $(DL)targets for RELEASE=$(RELEASE):$(DL)
  26. @echo $(DL)(default) . . . . libs nlms$(DL)
  27. @echo $(DL)all . . . . . . . does everything (libs nlms install)$(DL)
  28. @echo $(DL)libs. . . . . . . builds all libs$(DL)
  29. @echo $(DL)nlms. . . . . . . builds all nlms$(DL)
  30. @echo $(DL)install . . . . . builds libs and nlms and copies install files to$(DL)
  31. @echo $(DL) "$(INSTALL)"$(DL)
  32. @echo $(DL)installdev. . . . copies headers and files needed for development to$(DL)
  33. @echo $(DL) "$(INSTALL)"$(DL)
  34. @echo $(DL)clean . . . . . . deletes $(OBJDIR) dirs, *.err, and *.map$(DL)
  35. @echo $(DL)clobber_all . . . deletes all possible output from the make$(DL)
  36. @echo $(DL)clobber_install . deletes all files in $(INSTALL)$(DL)
  37. @$(ECHONL)
  38. @echo $(DL)Multiple targets can be used on a single make command line -$(DL)
  39. @echo $(DL)(i.e. $(MAKE) clean all)$(DL)
  40. @$(ECHONL)
  41. @echo $(DL)You can also specify RELEASE=debug, RELEASE=noopt, or RELEASE=release$(DL)
  42. @echo $(DL)The default is RELEASE=release$(DL)
  43. clobber_all :: clean clobber_install
  44. clobber_install ::
  45. $(call RMDIR,$(INSTALL))
  46. #
  47. # build recursive targets
  48. #
  49. $(SUBDIRS) : FORCE
  50. ifneq "$(MAKECMDGOALS)" "clean"
  51. @$(ECHONL)
  52. @echo Building $(CURDIR)/$@
  53. endif
  54. $(MAKE) -C $@ $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(LM_LICENSE_FILE)"
  55. @$(ECHONL)
  56. FORCE : ;
  57. #
  58. # Standard targets
  59. #
  60. clean :: $(SUBDIRS) $(APRTEST)
  61. @echo Cleaning up $(CURDIR)
  62. $(call RMDIR,$(OBJDIR))
  63. $(call DEL,*.err)
  64. $(call DEL,*.map)
  65. $(call DEL,*.tmp)
  66. # $(call DEL,*.d)
  67. $(OBJDIR) ::
  68. $(call MKDIR,$@)