home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource5
/
332_01
/
makefile.trc
< prev
next >
Wrap
Makefile
|
1990-01-07
|
13KB
|
418 lines
#################################################################
# PCCURSES #
# #
# Makefile to generate $(MODEL)curses.lib #
# for Borland Turbo-'C' v.1.0 and 2.0. #
# #
# This makefile will generate subdirectories and call itself #
# recursively. Some entries in this makefile are only for #
# the author's personal use (I preferred to keep my own stuff #
# in the same place). Those are at the end of the makefile. #
#################################################################
# 1.4: Release: 900114 #
#################################################################
# The following are the directories where your lib and include
# files will be installed. These need to be edited for your
# system. Here are also the default C compiler and the standard
# compilation flags. Change those if you want to. These are the
# only changes that should be made to the makefile, unless you
# have something special in mind...
LIBDIR=\trc\lib
INCDIR=\trc\inc
MANDIR=\man
CC=tcc
CFLAGS= -m$(MODEL) -c -O -Z -w -w-pro
#################################################################
# End of customizable stuff. #
#################################################################
OBJS= attrib.obj beep.obj border.obj boxes.obj \
charadd.obj chardel.obj charget.obj charins.obj \
charpick.obj clrtobot.obj clrtoeol.obj endwin.obj \
initscr.obj linedel.obj lineins.obj longname.obj \
move.obj mvcursor.obj newwin.obj options.obj \
overlay.obj prntscan.obj refresh.obj scrreg.obj \
setmode.obj setterm.obj stradd.obj strget.obj \
tabsize.obj termmisc.obj unctrl.obj update.obj \
winclear.obj windel.obj winerase.obj winmove.obj \
winscrol.obj wintouch.obj cursesio.obj
#################################################################
# 'default' is all that can (and usually is) done #
#################################################################
default: small compact medium large
#################################################################
# Install the .lib files in $(LIBDIR) directory. Header files #
# are already installed - have to be to make make work ;-) #
#################################################################
install: iheaders ismall icompact imedium ilarge iman
#################################################################
# The following copies the header files to their proper place #
#################################################################
iheaders: $(INCDIR)\curses.h $(INCDIR)\curspriv.h
$(INCDIR)\curses.h: curses.h
-attrib -r $(INCDIR)\curses.h
copy curses.h $(INCDIR)\curses.h
attrib +r $(INCDIR)\curses.h
$(INCDIR)\curspriv.h: curspriv.h
-attrib -r $(INCDIR)\curspriv.h
copy curspriv.h $(INCDIR)\curspriv.h
attrib +r $(INCDIR)\curspriv.h
#################################################################
# Install the manual pages in the man directory #
#################################################################
iman: $(MANDIR)\curses.3
$(MANDIR)\curses.3: curses.3
attrib -r $(MANDIR)\curses.3
copy curses.3 $(MANDIR)\curses.3
attrib +r $(MANDIR)\curses.3
#################################################################
# The following will create a subdirectory for each memory #
# model, and initiate the make:ing in each one. #
#################################################################
# Create work directory if non-existent, go to it, and #
# perform the job - small model #
#################################################################
ismall: small
-attrib -r $(LIBDIR)\scurses.lib
copy smodel.trc\scurses.lib $(LIBDIR)\scurses.lib
-attrib +r $(LIBDIR)\scurses.lib
small: iheaders \
smodel.trc \
smodel.trc\farnear.inc \
smodel.trc\smalhuge.inc
cd smodel.trc
-make -f ..\makefile.trc $(MAKEFLAGS) "MODEL=s" scurses.lib
cd ..
smodel.trc:
mkdir smodel.trc
smodel.trc\farnear.inc: nearcall.inc
copy nearcall.inc smodel.trc\farnear.inc
smodel.trc\smalhuge.inc: smaldata.inc
copy smaldata.inc smodel.trc\smalhuge.inc
#################################################################
# Create work directory if non-existent, go to it, and #
# perform the job - compact model #
#################################################################
icompact: compact
-attrib -r $(LIBDIR)\ccurses.lib
copy cmodel.trc\ccurses.lib $(LIBDIR)\ccurses.lib
-attrib +r $(LIBDIR)\ccurses.lib
compact: iheaders \
cmodel.trc \
cmodel.trc\farnear.inc \
cmodel.trc\smalhuge.inc
cd cmodel.trc
-make -f ..\makefile.trc $(MAKEFLAGS) "MODEL=c" ccurses.lib
cd ..
cmodel.trc:
mkdir cmodel.trc
cmodel.trc\farnear.inc: nearcall.inc
copy nearcall.inc cmodel.trc\farnear.inc
cmodel.trc\smalhuge.inc: hugedata.inc
copy hugedata.inc cmodel.trc\smalhuge.inc
#################################################################
# Create work directory if non-existent, go to it, and #
# perform the job - medium model #
#################################################################
imedium: medium
-attrib -r $(LIBDIR)\mcurses.lib
copy mmodel.trc\mcurses.lib $(LIBDIR)\mcurses.lib
-attrib +r $(LIBDIR)\mcurses.lib
medium: iheaders \
mmodel.trc \
mmodel.trc\farnear.inc \
mmodel.trc\smalhuge.inc
cd mmodel.trc
-make -f ..\makefile.trc $(MAKEFLAGS) "MODEL=m" mcurses.lib
cd ..
mmodel.trc:
mkdir mmodel.trc
mmodel.trc\farnear.inc: farcall.inc
copy farcall.inc mmodel.trc\farnear.inc
mmodel.trc\smalhuge.inc: smaldata.inc
copy smaldata.inc mmodel.trc\smalhuge.inc
#################################################################
# Create work directory if non-existent, go to it, and #
# perform the job - large model #
#################################################################
ilarge: large
-attrib -r $(LIBDIR)\lcurses.lib
copy lmodel.trc\lcurses.lib $(LIBDIR)\lcurses.lib
-attrib +r $(LIBDIR)\lcurses.lib
large: iheaders \
lmodel.trc \
lmodel.trc\farnear.inc \
lmodel.trc\smalhuge.inc
cd lmodel.trc
-make -f ..\makefile.trc $(MAKEFLAGS) "MODEL=l" lcurses.lib
cd ..
lmodel.trc:
mkdir lmodel.trc
lmodel.trc\farnear.inc: farcall.inc
copy farcall.inc lmodel.trc\farnear.inc
lmodel.trc\smalhuge.inc: hugedata.inc
copy hugedata.inc lmodel.trc\smalhuge.inc
#################################################################
# Put together the library in file tmp.lib, then rename it to #
# $(MODEL)curses.lib (You cannot answer 'y' to LIB prompt from #
# the .CMD file otherwise). #
#################################################################
$(MODEL)curses.lib: $(OBJS)
del $(MODEL)curses.lib
lib @..\curses.cmd
ren tmp.lib $(MODEL)curses.lib
#################################################################
# Commands and dependencies for individual modules #
#################################################################
attrib.obj: ..\attrib.c ..\curses.h ..\curspriv.h
$(CC) $(CFLAGS) -oattrib ..\attrib.c
beep.obj: ..\beep.c ..\curses.h ..\curspriv.h
$(CC) $(CFLAGS) -obeep ..\beep.c
border.obj: ..\border.c ..\curses.h ..\curspriv.h
$(CC) $(CFLAGS) -N -oborder ..\border.c
boxes.obj: ..\boxes.c ..\curses.h ..\curspriv.h
$(CC) $(CFLAGS) -oboxes ..\boxes.c
charadd.obj: ..\charadd.c ..\curses.h ..\curspriv.h
$(CC) $(CFLAGS) -ocharadd ..\charadd.c
chardel.obj: ..\chardel.c ..\curses.h ..\curspriv.h
$(CC) $(CFLAGS) -ochardel ..\chardel.c
charget.obj: ..\charget.c ..\curses.h ..\curspriv.h
$(CC) $(CFLAGS) -ocharget ..\charget.c
charins.obj: ..\charins.c ..\curses.h ..\curspriv.h
$(CC) $(CFLAGS) -ocharins ..\charins.c
charpick.obj: ..\charpick.c ..\curses.h ..\curspriv.h
$(CC) $(CFLAGS) -ocharpick ..\charpick.c
clrtobot.obj: ..\clrtobot.c ..\curses.h ..\curspriv.h
$(CC) $(CFLAGS) -oclrtobot ..\clrtobot.c
clrtoeol.obj: ..\clrtoeol.c ..\curses.h ..\curspriv.h
$(CC) $(CFLAGS) -oclrtoeol ..\clrtoeol.c
endwin.obj: ..\endwin.c ..\curses.h ..\curspriv.h
$(CC) $(C