home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. CD ROM (Annual Premium Edition)
/
premium.zip
/
premium
/
IBMOS2_2
/
SC621_16.ZIP
/
Makefile.msc
next >
Wrap
Makefile
|
1992-11-25
|
4KB
|
168 lines
# Makefile for Microsft C 6.00A and dmake 3.8 under OS/2,
# adapted from the supplied Makefile.
#
# Darrel Hankerson hank@ducvax.auburn.edu
# 27 October 1992
name=sc
NAME=SC
O = .obj
E = .exe
LD = cl
BIND = bind
# Set DOBACKUPS if you would like a backup copy of a source file on a save
DOBACKUPS=-DDOBACKUPS
# Set SIGVOID if signal routines are type void.
SIGVOID=-DSIGVOID
# Set RINT=-DRINT if you do not have rint() in math.h
RINT=-DRINT
# Set REGCMP if you have the regcmp/regex regular expression routines
#REGCMP=-DREGCMP
# This is the name of a pager like "more".
DFLT_PAGER=-DDFLT_PAGER=\"less\"
# this is the name to save back ups in
SAVE=-DSAVENAME=\"$(NAME).bak\"
# path to crypt, do not define if you don't have crypt
#CRYPT=-DCRYPT_PATH=\"c:\mks\os2\mksos2\crypt.exe\"
# If your system doesn't have notimeout() in curses define NONOTIMEOUT
NO_NOTIMEOUT=-DNONOTIMEOUT
YACC=bison -y
# MS-DOS needs y_tab instead of the normal y.tab
YTAB=y.tab
# Command to use to make temporary copies of some source files.
LN=cp
#### SYSTEM DEFINES ####
# Use this for OS/2 2.0, Watcom C/386 9.0 and MKS make, yacc and sed
#CFLAGS=-I. -omaxet -zp4 -4r -fpi87
MODEL = L
DEFS = -D__OS2__ -D__MSC__
CFLAGS= -A$(MODEL) $(DEFS)
#CFLAGS=-I. -d2
LDFLAGS=$(CFLAGS) -A$(MODEL) -Lp -F 3000
#LIB=curses.lib regex.lib c:\\\\watcom\\\\lib386\\\\os2\\\\os2386.lib
#LIB=curses.lib c:\\\\watcom\\\\lib386\\\\os2\\\\os2386.lib
LIB=$(MODEL)curses.lib
%.c : %.y
$(YACC) -d gram.y
mv $(YTAB).c gram.c
# All of the source files
SRC= cmds.c crypt.c eres.sed format.c gram.y help.c interp.c \
lex.c psc.c range.c sc.c sc.h screen.c sres.sed version.c \
vi.c vmtbl.c xmalloc.c
# The objects
OBJS=cmds$O crypt$O format$O gram$O help$O interp$O lex$O range$O sc$O \
screen$O version$O vi$O vmtbl$O xmalloc$O
# The documents in the Archive
DOCS=CHANGES README sc.doc psc.doc tutorial.sc VMS_NOTES torev build.com
all: $(name)$E p$(name)$E $(name)qref$E
bound: $(name)b$E p$(name)b$E $(name)qrefb$E
$(name)$E: $(OBJS) $(name).def
$(LD) -o $@ ${LDFLAGS} $(LIB) $<
$(name)b$E: $(name)$E
$(BIND) -o $@ $<
$(YTAB).h: gram.y
p$(name)$E: psc.c getopt.c pvmtbl$O pxmalloc$O p$(name).def
$(LD) $(LDFLAGS) -o $@ $<
p$(name)b$E: p$(name)$E
$(BIND) -o $@ $<
$(name)qref$E: qhelp.c sc.h $(name)qref.def
$(LD) -o $@ $(LDFLAGS) -DQREF -DSCNAME=\"$(NAME)\" qhelp.c $(name)qref.def
$(name)qrefb$E: $(name)qref$E
$(BIND) -o $@ $<
pvmtbl.c: vmtbl.c
-rm -f pvmtbl.c
$(LN) vmtbl.c pvmtbl.c
pvmtbl$O: pvmtbl.c sc.h
$(CC) ${CFLAGS} -c -DPSC pvmtbl.c
pxmalloc.c: xmalloc.c
-rm -f pxmalloc.c
$(LN) xmalloc.c pxmalloc.c
# Objects
cmds$O: cmds.c sc.h
$(CC) ${CFLAGS} ${DOBACKUPS} ${CRYPT} -c cmds.c
crypt$O: crypt.c sc.h
$(CC) ${CFLAGS} ${CRYPT} ${DOBACKUPS} -c crypt.c
format$O: format.c
$(CC) ${CFLAGS} -c format.c
help$O: help.c sc.h
$(CC) ${CFLAGS} ${CRYPT} -c help.c
qhelp.c: help.c
-cp -f help.c qhelp.c
interp$O: interp.c sc.h
$(CC) ${CFLAGS} ${IEEE_MATH} ${SIGVOID} ${RINT} ${RE_COMP} ${REGCMP} ${FMOD} -c interp.c
gram$O: sc.h $(YTAB).h gram.c
$(CC) ${CFLAGS} -c gram.c
sed < gram.y > experres.h -f eres.sed
sed < gram.y > statres.h -f sres.sed
lex$O: sc.h $(YTAB).h gram$O lex.c
$(CC) ${CFLAGS} ${SIMPLE} ${IEEE_MATH} ${SIGVOID} ${NO_NOTIMEOUT} -c lex.c
pxmalloc$O: sc.h pxmalloc.c
$(CC) ${CFLAGS} -c -DPSC pxmalloc.c
range$O: range.c sc.h
$(CC) ${CFLAGS} -c range.c
sc$O: sc.h sc.c
$(CC) ${CFLAGS} ${DFLT_PAGER} ${RIGHTBUG} ${SIGVOID} ${SAVE} -c sc.c
screen$O: sc.h screen.c
$(CC) ${CFLAGS} ${BROKENCURSES} ${IDLOKISBAD} ${INTERNATIONAL} ${RIGHTBUG} ${SIGVOID} ${NO_IDLOK} -c screen.c
vi$O: vi.c sc.h
$(CC) ${CFLAGS} -c vi.c
vmtbl$O: vmtbl.c sc.h
$(CC) ${CFLAGS} -c vmtbl.c
xmalloc$O: xmalloc.c sc.h
$(CC) ${CFLAGS} -c xmalloc.c
version$O: xmalloc.c sc.h
$(CC) ${CFLAGS} -c version.c
# other stuff
clean:
rm -f *$O *$E *.i *.err *.out