home *** CD-ROM | disk | FTP | other *** search
Makefile | 1992-01-27 | 2.9 KB | 108 lines |
- #############################################################################
- #
- # Zen Timer
- #
- # From the book
- # "Zen of Assembly Language"
- # Volume 1, Knowledge
- #
- # by Michael Abrash
- #
- # Makefile for a memory model indepedant
- # 'C' callable library by Kendall Bennett
- #
- # Descripton: Makefile for the Zen Timer library.
- #
- # $Id: makefile 1.3 92/01/27 21:40:16 kjb release $
- #
- #############################################################################
-
- # Turn on autodependency checking
-
- .AUTODEPEND
-
- # Let make know where to find all the appropriate files
-
- .PATH.asm = .
- .PATH.lib = \bc\lib\mylib
- .PATH.obj = .
- .PATH.exe = .
-
- # These directives will need to be modified for your particular setup.
- # Currently the are set for use with Borland C++ 3.0 installed in
- # the directory "BC" rather than "BORLANDC" as is the default.
-
- CC = bcc # Name of C compiler
- ASM = tasm # Name of assembler
- LINK = tlink # Name of linker
- LIB = tlib # Name of librarian
- LIB_FLAGS = /C /E
-
- # This will need to be changed to your normal include file directory
-
- INC_DEST = \bc\include\myinc
-
- LIBNAME = ztimer # Name of library file to create
-
- !if $d(debug)
- CC_DOPT = -v # Turn on debugging for C compiler
- ASM_DOPT = /ZI # Turn on debugging for assembler
- !endif
-
- # This library is memory model independant, but MUST be compiled in the
- # small model (I havent tested compiling in any other model, but it will
- # work correctly with code compiled in any model).
-
- MODEL = s # Default to small model
- ASM_MODEL = /d__SMALL__
-
- LIBFILE = $(.PATH.lib)\$(LIBNAME).lib
- ASM_FLAGS = /MX /m /O /i$(.PATH.asm) $(ASM_DOPT) $(ASM_MODEL)
- CC_FLAGS = -m$(MODEL) $(CC_DOPT)
-
- # Implicit rules to make the object files for the library...
-
- .c.obj:
- $(CC) $(CC_FLAGS) -c {$< }
-
- .asm.obj:
- $(ASM) $(ASM_FLAGS) $<, $&
-
- # Object files required by the library
-
- OBJECTS = pztimer.obj lztimer.obj
-
- all: $(LIBFILE) install_inc
-
- # Just build the library, don't install the header files
-
- build: $(LIBFILE)
-
- $(LIBFILE): $(OBJECTS)
- $(LIB) $(LIB_FLAGS) $< +-pztimer +-lztimer
-
- install_inc:
- @copy ztimer.h $(INC_DEST)
-
- # Clean up directory removing all files not needed to make the library.
- # This works for 4Dos 4.0. If you are running under MS DOS, you will
- # probably need to change this to delete each file type separately.
-
- clean:
- @del *.obj *.sym *.bak *.exe *.tdk
- @del $(.PATH.lib)\*.bak
-
- rcsclean:
- @rcsclean *.h *.c *.asm
-
- # Check in the latest revisions of source files with RCS
-
- ci:
- -ci -q -u pztimer.asm lztimer.asm ztimer.h
-
- # Check out the latest revisions of source files from RCS
-
- co:
- -co -q pztimer.asm lztimer.asm ztimer.h
-
-