2
0

NWGNUhead.inc 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 targets for RELEASE=$(RELEASE):
  26. @echo (default) . . . . libs nlms
  27. @echo all . . . . . . . does everything (libs nlms install)
  28. @echo libs. . . . . . . builds all libs
  29. @echo nlms. . . . . . . builds all nlms
  30. @echo install . . . . . builds libs and nlms and copies install files to
  31. @echo "$(INSTALL)"
  32. @echo installdev. . . . copies headers and files needed for development to
  33. @echo "$(INSTALL)"
  34. @echo clean . . . . . . deletes $(OBJDIR) dirs, *.err, and *.map
  35. @echo clobber_all . . . deletes all possible output from the make
  36. @echo clobber_install . deletes all files in $(INSTALL)
  37. @$(CMD) echo.
  38. @echo Multiple targets can be used on a single nmake command line -
  39. @echo (i.e. $(MAKE) clean all)
  40. @$(CMD) echo.
  41. @echo You can also specify RELEASE=debug, RELEASE=noopt, or RELEASE=optimized
  42. @echo The default is RELEASE=optimized
  43. clobber_all :: clean clobber_install
  44. clobber_install ::
  45. -$(DELTREE) $(INSTALL) 2>NUL
  46. #
  47. # build recursive targets
  48. #
  49. $(SUBDIRS) : FORCE
  50. ifneq "$(MAKECMDGOALS)" "clean"
  51. $(CMD) echo.
  52. @echo Building $(CURDIR)/$@
  53. endif
  54. $(MAKE) -C $@ $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(LM_LICENSE_FILE)"
  55. $(CMD) echo.
  56. FORCE:
  57. #
  58. # Standard targets
  59. #
  60. clean :: $(SUBDIRS)
  61. @echo Cleaning up $(CURDIR)
  62. -$(DELTREE) $(OBJDIR) 2> NUL
  63. $(CHK) *.err $(DEL) *.err
  64. $(CHK) *.map $(DEL) *.map
  65. $(CHK) *.d $(DEL) *.d
  66. $(CHK) *.tmp $(DEL) *.tmp
  67. $(CHK) xc.bat $(DEL) xc.bat
  68. -$(DELTREE) $(OBJDIR) 2> NUL
  69. $(OBJDIR) ::
  70. $(CHKNOT) $(OBJDIR)\nul mkdir $(OBJDIR)