home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / tn3270 / general / makefile < prev    next >
Encoding:
Makefile  |  1991-04-26  |  2.6 KB  |  158 lines

  1. #    @(#)makefile    4.3 (Berkeley) 4/26/91
  2.  
  3. # msdos versus unix defines
  4. O    = .o
  5. #PC_O    = .obj
  6.  
  7. X    =
  8. #PC_X    = .exe
  9.  
  10. L    =
  11. #PC_L    = -link
  12.  
  13. CC    = cc
  14. #PC_CC    = cl
  15.  
  16. MV    = mv
  17. #PC_MV    = rename
  18.  
  19. RM    = rm -f
  20. #PC_RM= erase
  21.  
  22. LINT_ARGS =
  23. #PC_LINT_ARGS = -DLINT_ARGS
  24.  
  25. DEBUG_FLAGS = -g
  26. #PC_DEBUG_FLAGS = -Zi -Od
  27.  
  28. AR    = ar
  29. AR1    = cr
  30. AR2    =
  31. AR3    =
  32. #PC_AR    = lib
  33. #PC_AR1    =
  34. #PC_AR2    = +
  35. #PC_AR3    = ";"
  36.  
  37. RANLIB    = ranlib
  38. #PC_RANLIB = echo "Done with "
  39.  
  40. PRINT    = print
  41.  
  42. DEFINES = ${LINT_ARGS}
  43.  
  44. INCLUDES = -I.
  45.  
  46. OPTIMIZE = -O
  47. OPTIMIZE = ${DEBUG_FLAGS}
  48.  
  49. CFLAGS    = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
  50.  
  51. # Lint flags
  52. LINTFLAGS    = -hbxaz
  53. # How to install the bloody thing...
  54.  
  55. DESTDIR=
  56.  
  57. BINDIR        = $(DESTDIR)/usr/ucb
  58. ETCDIR        = $(DESTDIR)/etc
  59. MANDIR        = $(DESTDIR)/usr/man/man
  60.  
  61. # Names for the terminal libraries...
  62. LIBCURSES    = -lcurses
  63. LIBTERM        = -ltermlib
  64.  
  65. # The source files...
  66. ALLH =    general.h globals.h
  67.  
  68. ALLC =    globals.c
  69.  
  70. #
  71. #    In a vax environment, we use vaxbsubs.s, which gives us a fair amount
  72. #    of increased performance.  We have provided genbsubs.c, which perform
  73. #    (more or less) the same function.
  74. SUBS = vaxbsubs.s
  75. SUBS = genbsubs.c
  76.  
  77. SUBSO = vaxbsubs$O
  78. SUBSO = genbsubs$O
  79.  
  80. ALLS = vaxbsubs.s
  81.  
  82. ALLHC=    ${ALLH} ${ALLC}
  83. ALLPRINT =    ${ALLHC} vaxbsubs.s genbsubs.c
  84.  
  85. ALLSOURCE =    ${ALLPRINT} makefile makefile.mak
  86.  
  87. ALLS =
  88.  
  89. ALLO    = globals$O ${SUBSO}
  90.  
  91. .s.o:
  92.     /lib/cpp -E $< | as -o $@
  93.  
  94. #.c.obj:
  95. #    ${CC} ${CFLAGS} -c $<
  96.  
  97. generallib.a:    ${ALLO}
  98.     ${RM} $@
  99.     for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done
  100.     ${RANLIB} $@
  101.  
  102. clean:
  103.     for i in $(ALLO) errs makefile.bak generallib.a; \
  104.         do (${RM} $$i); done
  105.  
  106. sccsclean:
  107.     -sccs clean
  108.     -sccs get makefile
  109.  
  110. clist:    ${ALLC}
  111.     @for i in ${ALLC} ; \
  112.         do (echo ${DIRPATH}$$i); done
  113.  
  114. hclist:    ${ALLHC}
  115.     @for i in ${ALLHC} ; \
  116.         do (echo ${DIRPATH}$$i); done
  117.  
  118. sourcelist:    ${ALLSOURCE}
  119.     @for i in ${ALLSOURCE}; \
  120.         do (echo ${DIRPATH}$$i); done
  121.  
  122. print:
  123.     ${PRINT} ${ALLPRINT}
  124.  
  125. tags:    ${ALLC} ${ALLH}
  126.     ctags -t ${ALLC} ${ALLH}
  127.  
  128. action:
  129.     ${ACTION}
  130.  
  131. lint:
  132.     lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${ALLC}
  133.  
  134. .DEFAULT:
  135.     sccs get $<
  136.  
  137. depend:
  138.     grep '^#include' ${ALLC} ${ALLH} | grep -v '<' | \
  139.     sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
  140.         -e 's/\.c/$$O/' | \
  141.     awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
  142.         else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
  143.                else rec = rec " " $$2 } } \
  144.           END { print rec } ' > makedep
  145.     echo '$$r makedep' >>eddep
  146.     echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
  147.     echo '$$r makedep' >>eddep
  148.     echo 'w' >>eddep
  149.     -rm -f makefile.bak
  150.     cp makefile makefile.bak
  151.     ed - makefile < eddep
  152.     rm eddep makedep
  153.  
  154. # DO NOT DELETE THIS LINE
  155.  
  156. globals$O: ../ctlr/hostctlr.h ../ctlr/oia.h ../ctlr/options.h ../ctlr/screen.h
  157. globals$O: globals.h ../general/general.h
  158.