home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / cmdline.lha / cmdline / src / lib / Makefile < prev    next >
Encoding:
Makefile  |  1992-08-03  |  3.4 KB  |  124 lines

  1. ##########################################################################
  2. ## ^FILE: Makefile - make file for the CmdLine C++ library
  3. ##
  4. ## ^DESCRIPTION:
  5. ##    This is the makefile that is used to build and install the CmdLine
  6. ##    library. In order to get CmdLine to build on your system you may
  7. ##    need to change some of the "variables" mentioned below. You may also
  8. ##    need to redefine some of the commands that are used.
  9. ##
  10. ## ^TARGETS:
  11. ##    all     : make the library and the test program
  12. ##    library : make the library
  13. ##    test    : make the test program
  14. ##    install : build and install the library and its include files
  15. ##    clean   : remove all intermediate files generated by the build
  16. ##    clobber : remove all files generated by the build
  17. ##
  18. ## ^VARIABLES:
  19. ##    OS         : specify the host operating system (default=unix)
  20. ##    STYLE      : specify the desired command-line syntax (default=unix)
  21. ##    FLAG       : debugging/optimization flags to the compiler (default=-g)
  22. ##    TESTDEFS   : #defines used for testing
  23. ##    USRDEFS    : #defines used for building (default=unix)
  24. ##    OPTIONS    : any other compiler flags to use
  25. ##
  26. ## ^HISTORY:
  27. ##    04/10/92    Brad Appleton    <brad@ssd.csd.harris.com>    Created
  28. ###^^#####################################################################
  29.  
  30. include ../../Config.mk
  31.  
  32. ###
  33. # operating-system dependent stuff
  34. ###
  35. # OSDEFS=$(DEF)$(OS) $(DEF)$(.UNIVERSE)_universe
  36. STYLE=$(OS)
  37.  
  38. ###
  39. # compilation options
  40. ###
  41. INCLUDES=$(INC)$(CURDIR)
  42. FLAG=$(OPT)
  43. # FLAG=$(DBG)
  44. TESTDEFS=
  45. # USRDEFS=$(DEF)DEBUG_CMDLINE
  46. DEFINES=$(OSDEFS) $(USRDEFS) $(TESTDEFS) $(DEF)$(STYLE)_style
  47. OPTIONS=
  48. CFLAGS=$(FLAG) $(INCLUDES) $(DEFINES) $(OPTIONS)
  49.  
  50. ###
  51. # libraries
  52. ###
  53. LIBRARY=lib$(LIBNAME)$(LIBEXT)
  54.  
  55. ###
  56. # files used
  57. ###
  58. OBJS=argiter$(OBJEXT) cmdarg$(OBJEXT) cmdargs$(OBJEXT) \
  59.    cmdline$(OBJEXT) dump$(OBJEXT)  fifolist$(OBJEXT) \
  60.    parse$(OBJEXT) patchlevel$(OBJEXT) private$(OBJEXT) \
  61.    strindent$(OBJEXT) $(STYLE)$(OBJEXT) usage$(OBJEXT)
  62.  
  63. ###
  64. # target dependencies
  65. ###
  66. all: library test
  67.  
  68. library: $(LIBRARY)
  69.  
  70. test: cmdtest$(EXECEXT)
  71.  
  72. cmdtest$(EXECEXT): cmdtest$(OBJEXT) $(OBJS)
  73.     $(CC) $(EXE)$@ cmdtest$(OBJEXT) $(LIBRARY)
  74.  
  75. $(LIBRARY): $(OBJS)
  76.     $(AR) $@ $(OBJS)
  77.     $(RANLIB) $@
  78.  
  79. ###
  80. # maintenance dependencies
  81. ###
  82. install: $(LIBRARY) $(LIBDIR) $(INCDIR) cmdline.h cmdargs.h
  83.     -$(RM) $(LIBDIR)$(LIBRARY) $(INCDIR)cmdline.h $(INCDIR)cmdargs.h
  84.     $(CP) $(LIBRARY) $(LIBDIR)$(LIBRARY)
  85.     $(CP) cmdline.h $(INCDIR)cmdline.h
  86.     $(CP) cmdargs.h $(INCDIR)cmdargs.h
  87.  
  88. clean:
  89.     -$(RM) *$(OBJEXT) core .exrc *~ \#*\#
  90.  
  91. clobber: clean
  92.     -$(RM) *$(LIBEXT) cmdtest tags TAGS
  93.  
  94. ###
  95. # object dependencies
  96. ###
  97. argiter$(OBJEXT) : argiter$(CEXT) cmdline.h
  98.  
  99. cmdarg$(OBJEXT) : cmdarg$(CEXT) cmdline.h
  100.  
  101. cmdargs$(OBJEXT) : cmdargs$(CEXT) cmdargs.h cmdline.h exits.h fifolist.h
  102.  
  103. cmdline$(OBJEXT) : cmdline$(CEXT) cmdline.h cmdargs.h arglist.h fifolist.h \
  104.    states.h
  105.  
  106. cmdtest$(OBJEXT) : cmdtest$(CEXT) cmdargs.h cmdline.h
  107.  
  108. dump$(OBJEXT) : dump$(CEXT) cmdline.h arglist.h fifolist.h states.h
  109.  
  110. fifolist$(OBJEXT) : fifolist$(CEXT) cmdline.h fifolist.h
  111.  
  112. parse$(OBJEXT) : parse$(CEXT) exits.h states.h cmdline.h arglist.h \
  113.    fifolist.h
  114.  
  115. patchlevel$(OBJEXT) : patchlevel$(CEXT) cmdline.h
  116.  
  117. private$(OBJEXT) : private$(CEXT) cmdline.h states.h arglist.h fifolist.h
  118.  
  119. strindent$(OBJEXT) : strindent$(CEXT) cmdline.h
  120.  
  121. unix$(OBJEXT) : unix$(CEXT) exits.h cmdline.h states.h
  122.  
  123. usage$(OBJEXT) : usage$(CEXT) cmdline.h states.h arglist.h fifolist.h
  124.