home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Makefiles / app / subproj.make < prev   
Text File  |  1992-07-07  |  2KB  |  58 lines

  1. #
  2. #                                 subproj.make
  3. #
  4. # Inputs from Makefile.preamble or Makefile.postamble (no defaults):
  5. #    OTHER_CFLAGS - Flags passed to compiler (in addition to -g, -O, etc.)
  6. #    OTHER_LDFLAGS - Flags passed to ld (in addition to -ObjC, etc.)
  7. #    OTHER_OFILES - Additional relocatables that may be linked in
  8. #    OTHER_PRODUCT_DEPENDS - Other dependencies of this project
  9. #    OTHER_SOURCEFILES - Other source files maintained by .pre/postamble
  10. #    OTHER_GARBAGE - Additional files to be removed by make 'clean' 
  11. #
  12. # Inputs from Makefile.preamble (no defaults):
  13. #    PRECOMPS - Precompiled headers that should be built before compilation 
  14. #    OTHER_INITIAL_TARGETS - Targets to be built before subprojects, etc.
  15. #
  16. # Inputs from Makefile.postamble (with defaults set in common.make):
  17. #    MAKEFILES - Makefiles this project depends on (default = Makefile)
  18. #
  19. # Inputs from Makefile (avoid setting these, ProjectBuilder controls them):
  20. #    NAME - name of application
  21. #    LANGUAGE - langage in which the project is written (default "English")
  22. #    LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
  23. #    GLOBAL_RESOURCES - non-localized resources of project
  24. #
  25. #    CLASSES - Class implementation files in project.
  26. #    HFILES - Header files in project.
  27. #    MFILES - Other Objective-C source files in project. 
  28. #    CFILES - Other C source files in project. 
  29. #    PSWFI3- .psw files in the project
  30. #    PSWMFILES - .pswm files in the project
  31. #    SUBPROJECTS - Subprojects of this project
  32. #    BUNDLES - Bundle subprojects of this project
  33. #    OTHERSRCS - Other miscellaneous sources of this project
  34. #    OTHERLINKED - Source files not matching a standard source extention
  35. #    OTHERLINKEDOFILES - Other relocatable files to (always) link in.
  36. #    MAKEFILEDIR - Directory in which to find this generic set of Makefiles
  37. #
  38.  
  39. include $(MAKEFILEDIR)/common.make
  40.  
  41. DOTO = $(OFILE_DIR)/$(NAME:.subproj=.o)
  42.  
  43. project:: $(INITIAL_TARGETS) subcomponents resources $(DOTO)
  44.  
  45. $(DOTO): $(PRODUCT_DEPENDS)
  46.     @($(MKDIRS) $(OFILE_DIR) ; \
  47.     if [ "`$(ECHO) $(OFILES) | wc -w`" != "       0" ] ; then \
  48.        $(ECHO) $(LD) $(OFILES) -r -o $(DOTO) ; \
  49.        $(LD) $(OFILES) -r -o $(DOTO) ; \
  50.     else \
  51.        $(ECHO) Warning: Building empty subproject... ; \
  52.        $(TOUCH) $(NAME:.subproj=.c) ; \
  53.        $(CC) $(CFLAGS) $(OTHER_CFLAGS) -c $(NAME:.subproj=.c) -o $(DOTO) ; \
  54.        $(RM) $(NAME:.subproj=.c) ; \
  55.     fi)
  56.  
  57. depend:: Makefile.dependencies $(SUBPROJECTS:.subproj=.depend) $(BUNDLES:.bproj=.depend)
  58.