home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / progs / spreadsc / makefile.msc next >
Makefile  |  1992-11-25  |  4KB  |  168 lines

  1. # Makefile for Microsft C 6.00A and dmake 3.8 under OS/2,
  2. # adapted from the supplied Makefile. 
  3. #
  4. # Darrel Hankerson hank@ducvax.auburn.edu
  5. # 27 October 1992
  6.  
  7. name=sc
  8. NAME=SC
  9.  
  10. O = .obj
  11. E = .exe
  12.  
  13. LD = cl
  14. BIND = bind
  15.  
  16. # Set DOBACKUPS if you would like a backup copy of a source file on a save
  17. DOBACKUPS=-DDOBACKUPS
  18.  
  19. # Set SIGVOID if signal routines are type void.
  20. SIGVOID=-DSIGVOID
  21.  
  22. # Set RINT=-DRINT if you do not have rint() in math.h
  23. RINT=-DRINT
  24.  
  25. # Set REGCMP if you have the regcmp/regex regular expression routines
  26. #REGCMP=-DREGCMP
  27.  
  28. # This is the name of a pager like "more".
  29. DFLT_PAGER=-DDFLT_PAGER=\"less\"
  30.  
  31. # this is the name to save back ups in
  32. SAVE=-DSAVENAME=\"$(NAME).bak\"
  33.  
  34. # path to crypt, do not define if you don't have crypt
  35. #CRYPT=-DCRYPT_PATH=\"c:\mks\os2\mksos2\crypt.exe\"
  36.  
  37. # If your system doesn't have notimeout() in curses define NONOTIMEOUT
  38. NO_NOTIMEOUT=-DNONOTIMEOUT
  39.  
  40. YACC=bison -y
  41.  
  42. # MS-DOS needs y_tab instead of the normal y.tab
  43. YTAB=y.tab
  44.  
  45. # Command to use to make temporary copies of some source files.
  46. LN=cp
  47.  
  48. #### SYSTEM DEFINES ####
  49.  
  50. # Use this for OS/2 2.0, Watcom C/386 9.0 and MKS make, yacc and sed
  51. #CFLAGS=-I. -omaxet -zp4 -4r -fpi87
  52. MODEL = L
  53. DEFS = -D__OS2__ -D__MSC__
  54. CFLAGS= -A$(MODEL) $(DEFS)
  55. #CFLAGS=-I. -d2
  56. LDFLAGS=$(CFLAGS) -A$(MODEL) -Lp -F 3000
  57. #LIB=curses.lib regex.lib c:\\\\watcom\\\\lib386\\\\os2\\\\os2386.lib
  58. #LIB=curses.lib c:\\\\watcom\\\\lib386\\\\os2\\\\os2386.lib
  59. LIB=$(MODEL)curses.lib
  60.  
  61. %.c : %.y
  62.     $(YACC) -d gram.y
  63.     mv $(YTAB).c gram.c
  64.  
  65. # All of the source files
  66. SRC= cmds.c crypt.c eres.sed format.c gram.y help.c interp.c \
  67.     lex.c psc.c range.c sc.c sc.h screen.c sres.sed version.c \
  68.     vi.c vmtbl.c xmalloc.c
  69.  
  70. # The objects
  71. OBJS=cmds$O crypt$O format$O gram$O help$O interp$O lex$O range$O sc$O \
  72.     screen$O version$O vi$O vmtbl$O xmalloc$O
  73.  
  74. # The documents in the Archive
  75. DOCS=CHANGES README sc.doc psc.doc tutorial.sc VMS_NOTES torev build.com
  76.  
  77. all:    $(name)$E p$(name)$E $(name)qref$E 
  78.  
  79. bound: $(name)b$E p$(name)b$E $(name)qrefb$E
  80.  
  81. $(name)$E:     $(OBJS) $(name).def
  82.     $(LD) -o $@ ${LDFLAGS} $(LIB) $<
  83.  
  84. $(name)b$E: $(name)$E
  85.     $(BIND) -o $@ $<
  86.  
  87. $(YTAB).h:    gram.y
  88.  
  89. p$(name)$E:    psc.c getopt.c pvmtbl$O pxmalloc$O p$(name).def
  90.     $(LD) $(LDFLAGS) -o $@ $<
  91.  
  92. p$(name)b$E: p$(name)$E
  93.     $(BIND) -o $@ $<
  94.  
  95. $(name)qref$E:    qhelp.c sc.h $(name)qref.def
  96.     $(LD) -o $@ $(LDFLAGS) -DQREF -DSCNAME=\"$(NAME)\" qhelp.c $(name)qref.def
  97.  
  98. $(name)qrefb$E: $(name)qref$E
  99.     $(BIND) -o $@ $<
  100.  
  101. pvmtbl.c: vmtbl.c
  102.     -rm -f pvmtbl.c
  103.     $(LN) vmtbl.c pvmtbl.c
  104.  
  105. pvmtbl$O: pvmtbl.c sc.h
  106.     $(CC) ${CFLAGS} -c -DPSC pvmtbl.c
  107.  
  108. pxmalloc.c: xmalloc.c
  109.     -rm -f pxmalloc.c
  110.     $(LN) xmalloc.c pxmalloc.c
  111.  
  112. # Objects
  113.  
  114. cmds$O: cmds.c sc.h
  115.     $(CC) ${CFLAGS} ${DOBACKUPS} ${CRYPT} -c cmds.c
  116.  
  117. crypt$O: crypt.c sc.h
  118.     $(CC) ${CFLAGS} ${CRYPT} ${DOBACKUPS} -c crypt.c
  119.  
  120. format$O: format.c
  121.     $(CC) ${CFLAGS} -c format.c
  122.  
  123. help$O: help.c sc.h
  124.     $(CC) ${CFLAGS} ${CRYPT} -c help.c
  125.  
  126. qhelp.c: help.c
  127.     -cp -f help.c qhelp.c
  128.  
  129. interp$O:    interp.c sc.h
  130.     $(CC) ${CFLAGS} ${IEEE_MATH} ${SIGVOID} ${RINT} ${RE_COMP} ${REGCMP} ${FMOD} -c interp.c
  131.  
  132. gram$O:    sc.h $(YTAB).h gram.c
  133.     $(CC) ${CFLAGS} -c gram.c
  134.     sed < gram.y > experres.h -f eres.sed
  135.     sed < gram.y > statres.h -f sres.sed
  136.  
  137. lex$O:    sc.h $(YTAB).h gram$O lex.c
  138.     $(CC) ${CFLAGS} ${SIMPLE} ${IEEE_MATH} ${SIGVOID} ${NO_NOTIMEOUT} -c lex.c
  139.  
  140. pxmalloc$O: sc.h pxmalloc.c
  141.     $(CC) ${CFLAGS} -c -DPSC pxmalloc.c
  142.  
  143. range$O: range.c sc.h
  144.     $(CC) ${CFLAGS} -c range.c
  145.  
  146. sc$O:    sc.h sc.c
  147.     $(CC) ${CFLAGS} ${DFLT_PAGER} ${RIGHTBUG} ${SIGVOID} ${SAVE} -c sc.c
  148.  
  149. screen$O:    sc.h screen.c
  150.     $(CC) ${CFLAGS} ${BROKENCURSES} ${IDLOKISBAD} ${INTERNATIONAL} ${RIGHTBUG} ${SIGVOID} ${NO_IDLOK} -c screen.c
  151.  
  152. vi$O: vi.c sc.h
  153.     $(CC) ${CFLAGS} -c vi.c
  154.  
  155. vmtbl$O: vmtbl.c sc.h
  156.     $(CC) ${CFLAGS} -c vmtbl.c
  157.  
  158. xmalloc$O: xmalloc.c sc.h
  159.     $(CC) ${CFLAGS} -c xmalloc.c
  160.  
  161. version$O: xmalloc.c sc.h
  162.     $(CC) ${CFLAGS} -c version.c
  163.  
  164. # other stuff
  165.  
  166. clean:
  167.     rm -f *$O *$E *.i *.err *.out
  168.