home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume29 / parseargs / part02 / Makefile < prev    next >
Encoding:
Makefile  |  1992-05-19  |  4.6 KB  |  231 lines

  1. # $Header: Makefile,v 2.1 89/12/30 20:59:01 eric Exp $
  2.  
  3. ###
  4. # operating-system dependent stuff
  5. ###
  6. .UNIVERSE =    att
  7. #.UNIVERSE =    ucb
  8. OS_TYPE =    unix
  9. # OS_DEFS =    -D${OS_TYPE} -D${.UNIVERSE}_universe
  10.  
  11. ###
  12. # targets
  13. ###
  14. NAME =    parseargs
  15. PROGRAM =    ${NAME}
  16. LIBRARY =    ${NAME}
  17. STYLE =    unix
  18.  
  19. ###
  20. # target directories
  21. ###
  22. LOCAL =  /usr/local
  23. LIBDIR = ${LOCAL}/lib
  24. INCDIR = ${LOCAL}/include
  25. PERLLIB = ${LIB}/perl
  26.  
  27. ###
  28. # compilation options
  29. ###
  30. INCLUDES =    -I.
  31. # MODEL =    -Ms
  32. # MODELNAME =    S
  33. # OPT =    -O
  34. OPT =    -g
  35. TEST_DEFS =    
  36. USR_DEFS =    -DUSE_PAGER
  37. DEFINES =    ${OS_DEFS} ${USR_DEFS} ${TEST_DEFS} -D${STYLE}_style
  38. OPTIONS =
  39. CFLAGS =    ${OPT} ${MODEL} ${INCLUDES} ${DEFINES} ${OPTIONS}
  40. LINTFLAGS =    ${INCLUDES} ${DEFINES} ${OPTIONS}
  41.  
  42. ###
  43. # libraries
  44. ###
  45. LIBARGS =    ${MODELNAME}lib${STYLE}_args.a
  46. LIBFILE =    ${MODELNAME}libparse.a
  47. LOCLIBS =    ${LIBARGS}
  48. # SYSLIBS =    -lm -lcurses -ltermcap
  49. LIBS =    ${LOCLIBS} ${SYSLIBS}
  50.  
  51. ###
  52. # commands
  53. ###
  54. AR =    ar rvu
  55. DEL =    rm -f
  56. COPY =    cp
  57. CHDIR =    cd
  58. LINT =    lint
  59. MKTAGS =    ctags
  60. PRINT =    pr
  61. RANLIB =    ranlib
  62. SHAR =    shar
  63. SQZ =    compress -v
  64. STRIP =    strip
  65.  
  66. ###
  67. # files used
  68. ###
  69. DOCS=    doc/Makefile \
  70.         doc/argtype.man3 \
  71.         doc/parseargs.man1 \
  72.         doc/parseargs.man3 \
  73.         doc/parsecntl.man3 \
  74.         doc/arg_macros.inc \
  75.         doc/argdesc.inc \
  76.         doc/argflags.inc \
  77.         doc/argvalopt.inc \
  78.         doc/bugs.inc \
  79.         doc/caveats.inc \
  80.         doc/cmd_macros.inc \
  81.         doc/defargs.inc \
  82.         doc/effects.inc \
  83.         doc/env_args.inc \
  84.         doc/env_parse.inc \
  85.         doc/env_usage.inc \
  86.         doc/fparseargs3.inc \
  87.         doc/lib_bugs.inc \
  88.         doc/lparseargs3.inc \
  89.         doc/multivals.inc \
  90.         doc/parseargs1.inc \
  91.         doc/parseargs3.inc \
  92.         doc/parsecntl3.inc \
  93.         doc/parsecntls.inc \
  94.         doc/parseflags.inc \
  95.         doc/parsemodes.inc \
  96.         doc/returns.inc \
  97.         doc/sh_arrays.inc \
  98.         doc/shells.inc \
  99.         doc/sparseargs3.inc \
  100.         doc/usage3.inc \
  101.         doc/vparseargs3.inc
  102. SCRIPTS =    test.sh  test.csh  test.ksh  test.rc  test.awk  test.pl
  103. PERLSUB =    ${NAME}.pl
  104. XXFILES =    Intro  README  MANIFEST  Makefile  Makefile.cpp
  105.  
  106. HDRS =    ${NAME}.h \
  107.         patchlevel.h \
  108.         pgopen.h \
  109.         strfuncs.h \
  110.         useful.h
  111.  
  112. SRCS =    ${NAME}.c \
  113.         argtype.c \
  114.         arglist.c \
  115.         amiga_args.c \
  116.         ibm_args.c \
  117.         pgopen.c \
  118.         stest.c \
  119.         strfuncs.c \
  120.         syserr.c \
  121.         unix_args.c \
  122.         unix_man.c \
  123.         vms_args.c \
  124.         vprintf.c \
  125.         winsize.c \
  126.         xparse.c
  127.  
  128. OBJS =  ${STYLE}_args.o \
  129.          arglist.o \
  130.          argtype.o \
  131.          pgopen.o \
  132.          strfuncs.o \
  133.          syserr.o \
  134.          vprintf.o \
  135.          winsize.o \
  136.          xparse.o
  137.  
  138. PROG_OBJS =  ${NAME}.o   unix_man.o
  139. TEST_OBJS =  stest.o
  140.  
  141. FILES =    ${XXFILES} ${DOCS} ${HDRS} ${SRCS} ${PERLSUB} ${SCRIPTS}
  142.  
  143. ###
  144. # target dependencies
  145. ###
  146. all: ${LIBARGS} test ${PROGRAM}
  147.  
  148. test: ${STYLE}_test
  149.  
  150. ${STYLE}_test :  stest.o ${LOCLIBS}
  151.     ${CC} ${CFLAGS} -o ${STYLE}_test  stest.o ${LOCLIBS} ${SYSLIBS}
  152.  
  153. ${LIBARGS}: ${OBJS}
  154.     ${AR} $@ ${OBJS}
  155.     ${RANLIB} $@
  156.  
  157. ${PROGRAM}: ${PROG_OBJS} ${LOCLIBS}
  158.     ${CC} ${CFLAGS} -o $@ ${PROG_OBJS} ${LOCLIBS} ${SYSLIBS}
  159.  
  160. ###
  161. # object dependencies
  162. ###
  163. ${NAME}.o:    ${NAME}.c ${NAME}.h patchlevel.h strfuncs.h useful.h
  164. amiga_args.o:    amiga_args.c ${NAME}.h pgopen.h strfuncs.h useful.h \
  165.                 exit_codes.h
  166. arglist.o:    arglist.c ${NAME}.h strfuncs.h useful.h
  167. argtype.o:    argtype.c ${NAME}.h strfuncs.h useful.h
  168. ibm_args.o:    ibm_args.c ${NAME}.h pgopen.h strfuncs.h useful.h exit_codes.h
  169. pgopen.o:    pgopen.c useful.h exit_codes.h
  170. stest.o:    stest.c ${NAME}.h useful.h
  171. strfuncs.o:    strfuncs.c useful.h
  172. syserr.o:    syserr.c useful.h
  173. unix_args.o:    unix_args.c ${NAME}.h pgopen.h strfuncs.h useful.h exit_codes.h
  174. unix_man.o:    unix_man.c ${NAME}.h strfuncs.h useful.h
  175. vms_args.o:    vms_args.c ${NAME}.h pgopen.h strfuncs.h useful.h exit_codes.h
  176. vprintf.o:    vprintf.c useful.h
  177. winsize.o:    winsize.c useful.h
  178. xparse.o:    xparse.c ${NAME}.h strfuncs.h useful.h exit_codes.h
  179.  
  180. ###
  181. # installation dependencies
  182. ###
  183. install:  ${INCDIR}/${NAME}.h \
  184.          ${LIBDIR}/${LIBFILE} \
  185.          ${LOCAL}/${PROGRAM}
  186.  
  187.  ${INCDIR}/${NAME}.h: ${NAME}.h useful.h
  188.     ( ${CHDIR} ${INCDIR}; ${DEL} ${NAME}.h useful.h )
  189.     ${COPY} ${NAME}.h useful.h ${INCDIR}
  190.  
  191.  ${LIBDIR}/${LIBFILE}: ${LIBARGS}
  192.     ${DEL}   ${LIBDIR}/${LIBFILE}
  193.     ${COPY} ${LIBARGS}   ${LIBDIR}/${LIBFILE}
  194.     ${RANLIB}   ${LIBDIR}/${LIBFILE}
  195.  
  196.  ${LOCAL}/${PROGRAM}: ${PROGRAM} ${PERLSUB}
  197.     ${DEL} ${LOCAL}/${PROGRAM} ${PERLIB}/${PERLSUB}
  198.     ${COPY} ${PROGRAM} ${LOCAL}
  199.     ${STRIP} ${LOCAL}/${PROGRAM}
  200.     ${COPY} ${PERLSUB} ${PERLLIB}
  201.  
  202. ###
  203. # maintenance dependencies
  204. ###
  205. lint: ${SRCS}
  206.     ${LINT} ${LINTFLAGS} ${SRCS}
  207.  
  208. shar: ${NAME}.shar
  209.  
  210. ${NAME}.shar: ${FILES}
  211.     ${DEL} ${NAME}.shar
  212.     ${SHAR} ${FILES}  >${NAME}.shar
  213.  
  214. clean:
  215.     ${DEL} ${OBJS} ${PROG_OBJS} ${TEST_OBJS}
  216.     ${DEL} tags core .exrc
  217.  
  218. clobber: clean
  219.     ${DEL} ${LIBARGS}  ${PROGRAM}  ${STYLE}_test
  220.  
  221. tags: ${SRCS} ${HDRS}
  222.     ${MKTAGS} ${SRCS} ${HDRS}
  223.  
  224. collapse: clobber shar
  225.     ${SQZ} ${NAME}.shar
  226.     ${DEL} ${FILES}
  227.  
  228. print: ${SRCS} ${HDRS}
  229.     @${PRINT} ${SRCS} ${HDRS}
  230.  
  231.