home *** CD-ROM | disk | FTP | other *** search
- # The following are the directories where your lib and include files
- # will be installed. These need to be edited for your system.
-
- BASE = \usr\misc\cmouse
- LIBDIR= \usr\lib
- INCDIR= \usr\include
-
- # General definitions:
-
- CFLAGS= -M$(MODEL) -Gs -W2 -c
-
- COBJS= mouse.obj
-
- ASMOBJS= handler.obj
-
- OBJS= $(COBJS) $(ASMOBJS)
-
- CC= cl
-
- all: small compact medium large
-
- $(COBJS): $(INCDIR)\mouse.h
-
- #################################################################
- # 'all' is all that can (and usually is) done #
- #################################################################
-
- #################################################################
- # The following copies the header files to their proper place #
- #################################################################
-
- headers: $(INCDIR)\mouse.h
-
- $(INCDIR)\mouse.h: $(BASE)\mouse.h
- copy mouse.h $(INCDIR)\mouse.h
-
- #################################################################
- # 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 #
- #################################################################
-
- small: headers \
- smodel \
- smodel\farnear.inc \
- smodel\smalhuge.inc \
- smodel\model.inc
- cd smodel
- make -f ..\makefile $(MAKEFLAGS) "MODEL=s" $(LIBDIR)\smouse.lib
- cd ..
-
- smodel:
- mkdir smodel
-
- smodel\farnear.inc: nearcall.inc
- copy nearcall.inc smodel\farnear.inc
-
- smodel\smalhuge.inc: smaldata.inc
- copy smaldata.inc smodel\smalhuge.inc
-
- smodel\model.inc: small.inc
- copy small.inc smodel\model.inc
-
- #################################################################
- # Create work directory if non-existent, go to it, and #
- # perform the job - compact model #
- #################################################################
-
- compact: headers \
- cmodel \
- cmodel\farnear.inc \
- cmodel\smalhuge.inc \
- cmodel\model.inc
- cd cmodel
- make -f ..\makefile $(MAKEFLAGS) "MODEL=c" $(LIBDIR)\cmouse.lib
- cd ..
-
- cmodel:
- mkdir cmodel
-
- cmodel\farnear.inc: nearcall.inc
- copy nearcall.inc cmodel\farnear.inc
-
- cmodel\smalhuge.inc: hugedata.inc
- copy hugedata.inc cmodel\smalhuge.inc
-
- cmodel\model.inc: compact.inc
- copy compact.inc cmodel\model.inc
-
- #################################################################
- # Create work directory if non-existent, go to it, and #
- # perform the job - medium model #
- #################################################################
-
- medium: headers \
- mmodel \
- mmodel\farnear.inc \
- mmodel\smalhuge.inc \
- mmodel\model.inc
- cd mmodel
- make -f ..\makefile $(MAKEFLAGS) "MODEL=m" $(LIBDIR)\mmouse.lib
- cd ..
-
- mmodel:
- mkdir mmodel
-
- mmodel\farnear.inc: farcall.inc
- copy farcall.inc mmodel\farnear.inc
-
- mmodel\smalhuge.inc: smaldata.inc
- copy smaldata.inc mmodel\smalhuge.inc
-
- mmodel\model.inc: medium.inc
- copy medium.inc mmodel\model.inc
-
- #################################################################
- # Create work directory if non-existent, go to it, and #
- # perform the job - large model #
- #################################################################
-
- large: headers \
- lmodel \
- lmodel\farnear.inc \
- lmodel\smalhuge.inc \
- lmodel\model.inc
- cd lmodel
- make -f ..\makefile $(MAKEFLAGS) "MODEL=l" $(LIBDIR)\lmouse.lib
- cd ..
-
- lmodel:
- mkdir lmodel
-
- lmodel\farnear.inc: farcall.inc
- copy farcall.inc lmodel\farnear.inc
-
- lmodel\smalhuge.inc: hugedata.inc
- copy hugedata.inc lmodel\smalhuge.inc
-
- lmodel\model.inc: large.inc
- copy large.inc lmodel\model.inc
-
- #################################################################
- # Put together the library in file tmp.lib, then copy it to #
- # the appropriate name for the memory model in question, and #
- # delete the temporary file #
- #################################################################
-
- $(LIBDIR)\$(MODEL)mouse.lib: $(OBJS)
- del tmp.lib
- lib @..\mouse.cmd
- copy tmp.lib $(LIBDIR)\$(MODEL)mouse.lib
- del tmp.lib
-
- handler.obj: ..\handler.asm
- masm -Mx ..\handler.asm,handler.obj,nul,nul;
-
- mouse.obj: ..\mouse.c
- $(CC) $(CFLAGS) ..\mouse.c
-