home *** CD-ROM | disk | FTP | other *** search
Makefile | 1991-04-25 | 12.6 KB | 418 lines |
- #################################################################
- # PCCURSES #
- # #
- # Makefile to generate $(MODEL)curses.lib #
- # For MicroSoft 'C' v.3.0, 4.0 and 5.1. #
- # #
- # 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=\msc\lib
- INCDIR=\msc\inc
- MANDIR=\man
- CC=cl
- CFLAGS=-M$(MODEL) -c -Ox -W2
-
- #################################################################
- # 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.msc\scurses.lib $(LIBDIR)\scurses.lib
- -attrib +r $(LIBDIR)\scurses.lib
-
- small: iheaders \
- smodel.msc \
- smodel.msc\farnear.inc \
- smodel.msc\smalhuge.inc
- cd smodel.msc
- -make -f ..\makefile.msc $(MAKEFLAGS) "MODEL=s" scurses.lib
- cd ..
-
- smodel.msc:
- mkdir smodel.msc
-
- smodel.msc\farnear.inc: nearcall.inc
- copy nearcall.inc smodel.msc\farnear.inc
-
- smodel.msc\smalhuge.inc: smaldata.inc
- copy smaldata.inc smodel.msc\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.msc\ccurses.lib $(LIBDIR)\ccurses.lib
- -attrib +r $(LIBDIR)\ccurses.lib
-
- compact: iheaders \
- cmodel.msc \
- cmodel.msc\farnear.inc \
- cmodel.msc\smalhuge.inc
- cd cmodel.msc
- -make -f ..\makefile.msc $(MAKEFLAGS) "MODEL=c" ccurses.lib
- cd ..
-
- cmodel.msc:
- mkdir cmodel.msc
-
- cmodel.msc\farnear.inc: nearcall.inc
- copy nearcall.inc cmodel.msc\farnear.inc
-
- cmodel.msc\smalhuge.inc: hugedata.inc
- copy hugedata.inc cmodel.msc\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.msc\mcurses.lib $(LIBDIR)\mcurses.lib
- -attrib +r $(LIBDIR)\mcurses.lib
-
- medium: iheaders \
- mmodel.msc \
- mmodel.msc\farnear.inc \
- mmodel.msc\smalhuge.inc
- cd mmodel.msc
- -make -f ..\makefile.msc $(MAKEFLAGS) "MODEL=m" mcurses.lib
- cd ..
-
- mmodel.msc:
- mkdir mmodel.msc
-
- mmodel.msc\farnear.inc: farcall.inc
- copy farcall.inc mmodel.msc\farnear.inc
-
- mmodel.msc\smalhuge.inc: smaldata.inc
- copy smaldata.inc mmodel.msc\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.msc\lcurses.lib $(LIBDIR)\lcurses.lib
- -attrib +r $(LIBDIR)\lcurses.lib
-
- large: iheaders \
- lmodel.msc \
- lmodel.msc\farnear.inc \
- lmodel.msc\smalhuge.inc
- cd lmodel.msc
- -make -f ..\makefile.msc $(MAKEFLAGS) "MODEL=l" lcurses.lib
- cd ..
-
- lmodel.msc:
- mkdir lmodel.msc
-
- lmodel.msc\farnear.inc: farcall.inc
- copy farcall.inc lmodel.msc\farnear.inc
-
- lmodel.msc\smalhuge.inc: hugedata.inc
- copy hugedata.inc lmodel.msc\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) -Foattrib ..\attrib.c
-
- beep.obj: ..\beep.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fobeep ..\beep.c
-
- border.obj: ..\border.c ..\curses.h ..\curspriv.h
- $(CC) -M$(MODEL) -c -Oat -W2 -Foborder ..\border.c
-
- boxes.obj: ..\boxes.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Foboxes ..\boxes.c
-
- charadd.obj: ..\charadd.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Focharadd ..\charadd.c
-
- chardel.obj: ..\chardel.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fochardel ..\chardel.c
-
- charget.obj: ..\charget.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Focharget ..\charget.c
-
- charins.obj: ..\charins.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Focharins ..\charins.c
-
- charpick.obj: ..\charpick.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Focharpick ..\charpick.c
-
- clrtobot.obj: ..\clrtobot.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Foclrtobot ..\clrtobot.c
-
- clrtoeol.obj: ..\clrtoeol.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Foclrtoeol ..\clrtoeol.c
-
- endwin.obj: ..\endwin.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Foendwin ..\endwin.c
-
- initscr.obj: ..\initscr.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Foinitscr ..\initscr.c
-
- linedel.obj: ..\linedel.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Folinedel ..\linedel.c
-
- lineins.obj: ..\lineins.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Folineins ..\lineins.c
-
- longname.obj: ..\longname.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Folongname ..\longname.c
-
- move.obj: ..\move.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fomove ..\move.c
-
- mvcursor.obj: ..\mvcursor.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fomvcursor ..\mvcursor.c
-
- newwin.obj: ..\newwin.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fonewwin ..\newwin.c
-
- options.obj: ..\options.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fooptions ..\options.c
-
- overlay.obj: ..\overlay.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fooverlay ..\overlay.c
-
- prntscan.obj: ..\prntscan.c ..\curses.h ..\curspriv.h
- $(CC) -M$(MODEL) -c -Oat -W2 -Foprntscan ..\prntscan.c
-
- refresh.obj: ..\refresh.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Forefresh ..\refresh.c
-
- scrreg.obj: ..\scrreg.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Foscrreg ..\scrreg.c
-
- setmode.obj: ..\setmode.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fosetmode ..\setmode.c
-
- setterm.obj: ..\setterm.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fosetterm ..\setterm.c
-
- stradd.obj: ..\stradd.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fostradd ..\stradd.c
-
- strget.obj: ..\strget.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fostrget ..\strget.c
-
- tabsize.obj: ..\tabsize.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fotabsize ..\tabsize.c
-
- termmisc.obj: ..\termmisc.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fotermmisc ..\termmisc.c
-
- unctrl.obj: ..\unctrl.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Founctrl ..\unctrl.c
-
- update.obj: ..\update.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Foupdate ..\update.c
-
- winclear.obj: ..\winclear.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fowinclear ..\winclear.c
-
- windel.obj: ..\windel.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fowindel ..\windel.c
-
- winerase.obj: ..\winerase.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fowinerase ..\winerase.c
-
- winmove.obj: ..\winmove.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fowinmove ..\winmove.c
-
- winscrol.obj: ..\winscrol.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fowinscrol ..\winscrol.c
-
- wintouch.obj: ..\wintouch.c ..\curses.h ..\curspriv.h
- $(CC) $(CFLAGS) -Fowintouch ..\wintouch.c
-
- cursesio.obj: ..\cursesio.asm
- masm ..\cursesio.asm/mx,cursesio.obj,nul,nul;
-
- #################################################################
- # Perform a backup of the files in the directory where the #
- # 'make backup' command was issued - copies all files to the #
- # floppy in drive A: or B: #
- #################################################################
-
- A_backup:
- @echo ***** Backup of PCcurses *****
- @echo Insert backup diskette in drive A: and hit any key!
- @pause
- @echo Y > yes.txt
- del a:\*.* < yes.txt >NUL
- @del yes.txt
- copy *.* a:
-
- B_backup:
- @echo ***** Backup of PCcurses *****
- @echo Insert backup diskette in drive B: and hit any key!
- @pause
- @echo Y > yes.txt
- del b:\*.* < yes.txt >NUL
- @del yes.txt
- copy *.* b:
-
- #################################################################
- # Remove all temporary files and work directories that were #
- # created #
- #################################################################
-
- clean:
- @echo Y > yes.txt
- del smodel.msc\*.* < yes.txt >NUL
- del cmodel.msc\*.* < yes.txt >NUL
- del mmodel.msc\*.* < yes.txt >NUL
- del lmodel.msc\*.* < yes.txt >NUL
- @del yes.txt
- rmdir smodel.msc
- rmdir cmodel.msc
- rmdir mmodel.msc
- rmdir lmodel.msc
-
- #################################################################
- # The following is only for the authors installation of his #
- # special libraries. #
- #################################################################
-
- iau: iheaders isau icau imau ilau iman
-
- isau: small
- cd smodel.msc
- copy scurses.lib bltmp.lib
- -attrib -r $(LIBDIR)\sbllibc.lib
- -attrib -r $(LIBDIR)\sbllibc.bak
- -lib $(LIBDIR)\sbllibc.lib @..\bllibc.cmd
- -attrib +r $(LIBDIR)\sbllibc.lib
- del bltmp.lib
- cd ..
-
- icau: compact
- cd cmodel.msc
- copy ccurses.lib bltmp.lib
- -attrib -r $(LIBDIR)\cbllibc.lib
- -attrib -r $(LIBDIR)\cbllibc.bak
- -lib $(LIBDIR)\cbllibc.lib @..\bllibc.cmd
- -attrib +r $(LIBDIR)\cbllibc.lib
- del bltmp.lib
- cd ..
-
- imau: medium
- cd mmodel.msc
- copy mcurses.lib bltmp.lib
- -attrib -r $(LIBDIR)\mbllibc.lib
- -attrib -r $(LIBDIR)\mbllibc.bak
- -lib $(LIBDIR)\mbllibc.lib @..\bllibc.cmd
- -attrib +r $(LIBDIR)\mbllibc.lib
- del bltmp.lib
- cd ..
-
- ilau: large
- cd lmodel.msc
- copy lcurses.lib bltmp.lib
- -attrib -r $(LIBDIR)\lbllibc.lib
- -attrib -r $(LIBDIR)\lbllibc.bak
- -lib $(LIBDIR)\lbllibc.lib @..\bllibc.cmd
- -attrib +r $(LIBDIR)\lbllibc.lib
- del bltmp.lib
- cd ..
-
- shar:
- command -c makekit -x *.* >manifest
- makekit -m *.*
- del manifest.*
-