home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_GEN
/
FACETV.ZIP
/
MAKEFILE.BCC
< prev
next >
Wrap
Text File
|
1994-01-05
|
16KB
|
610 lines
#########################################################################
# #
# @(#)makefile (C++ version) 01/05/94 Chris Ahlstrom #
# #
#########################################################################
PROJ = FACE_TV
########################################################################
#
# ----------------------------------
# Chris Ahlstrom
# 811-F Hideaway Bay Lane
# Mt. Pleasant, SC 29464
# (803)849-0985 voice
# (803)792-8483 work
# 73340.26!compuserve.com
# ----------------------------------
#
# Borland-style C++ MAKEFILE for FACE_TV.LIB (C++ version). This library
# is extremely important for many FACE programs.
#
# THINGS TO DO:
#
# Rewrite it so that re-inserting the new OBJ into the library
# comes right after compiling it.
#
#================================================================
# GENERAL USAGE
#================================================================
#
# To use this makefile, copy it to a file named "makefile". Given
# that all paths are set up to reach the compiler and include files,
# type
#
# make [options] [target]
#
# where the allowed options (case is significant!) are
#
# -touch Touch (preparatory to "make -Dother options")
# -Debug Compile for debugging under CodeView
# -Dtest Compile without need for DT2801A board.
#
# See the bottom of this file for the targets allowed (touch, clean...)
#
#================================================================
# LOCATION OF COMPILER-RELATED DIRECTORIES
#================================================================
#
# Location of the Borland 3.1 C++ Libraries and Executables; unfortunately
# it is needed to allow TLINK to find it's special OBJs and LIBs.
# The best thing to do is to put all compilers on the same drive,
# and set the AUTOEXEC.BAT file to define COMPILE, using the command
#
# SET COMPILE=D: (or whatever)
#
########################################################################
BCL = $(COMPILE)\BC\LIB
TVL = $(COMPILE)\BC\TVISION\LIB
BGI = $(COMPILE)\BC\BGI
USR = $(USRDISK)\USR\LIB
INCLUDEPATH = $(COMPILE)\BC\INCLUDE;$(COMPILE)\BC\TVISION\INCLUDE
########################################################################
#
#================================================================
# GENERATING A DEBUGGABLE VERSION
#================================================================
#
# To recreate the program with debugging code, first do a "make touch",
# or touch each file for which debug information is desired. Then call
# "make -Debug".
#
#
#================================================================
# COMPILER VERSION INFORMATION
#================================================================
#
# Tool Borland
# ==== =======
#
# C Compiler BCC v. 3.10 (2.00 should work)
# Linker TLINK v. 3.01
# Librarian TLIB v. 3.01
# Make Util. MAKE v. 3.00
# Assembler TASM v. 2.00
# Debugger TD v. 3.0
#
#
# Borland 3.1 C/C++ Compiler
# ==========================
#
# Some useful settings (not all are used):
#
# ml for large memory model
# A for ANSI-compatible C-code compiling
# O- (for starters) to disable optimization
# G to optimize in favor of speed over size
# G- to optimize in favor of size over speed
# 1 to generate 80286 real-mode instructions
# S to generate an assembly+source listing (but doesn't compile)
# c to force compile-only
# i31 to restrict external name length to 31 characters
# w (for starters) to yield default level of warnings
# w-stv disable passing structures by value warnings (done in source code)
# D to define __MSDOS__ is done automatically in Borland 2.0 C.
# y include line numbers
# v include symbolic debugger information
# N generate stack overflow logic
# u Prepend an underscore before all variable names
# -f287 Use only inline 80x87 code for floating point operations.
#
########################################################################
########################################################################
#
# Turn on auto-dependency check of the .OBJ files (same as "-a" option)
#
########################################################################
.AUTODEPEND
########################################################################
#
# Note the following "problems": -v and -vi are always set in the
# cis.cfg file, and we don't always need them; -f287 isn't yet
# part of the face_tv.cfg file; we can debug with the Optimizer on,
# with Borland; CFLAG definitions are used only for debugging and
# control of optimization.
#
########################################################################
!if $d(fp486)
FP = FP486
!else
FP = FP386
!endif
!if $d(test)
TESTFLG = TEST
!else
TESTFLG = NOT_TEST
!endif
!if $d(heap)
HEAPFLG = TESTHEAP
!else
HEAPFLG = NOHEAP
!endif
CC = bcc +$(PROJ).CFG
!if $d(ebug)
CFLAGS = -O- -v
!else
CFLAGS =
!endif
########################################################################
#
# =======================
# Borland Turbo Assembler
# =======================
#
# Some useful settings (not all are used):
#
# t Terse mode; suppress messages for successful assembly
# z Display source line with error messages.
# zi Full debug info
# zd Debugging line numbers only
# l Generate normal listing
# la Generate expanded listing
# w2 Maximum level of warnings
# dTEXT Define the symbol called "TEXT"
# mx Treat external (public) symbols as case-sensitive
#
########################################################################
AS = tasm
!if $d(ebug)
AFLAGS = /mx /t /zi /d__FARPROCS__ /d__C_CALLS__=1
!else
AFLAGS = /mx /t /d__FARPROCS__ /d__C_CALLS__=1
!endif
########################################################################
#
# ================================
# Borland 3.1 C/C++ TLINK (Linker)
# ================================
#
# The general form of a Turbo TLINK command line differs a lot from that
# for Microsoft LINK:
#
# tlink /c C0l objs,exe,[map],[usrlib][ovrlay][emu|fp87 mathx] Cl
#
# where the symbols mean:
#
# /c make lower case significant
# C0l initialization module for memory model l (large)
# objs the object modules for the current project
# exe the root name for the *.EXE file
# map optional mapfile's name
# usrlib a list of user's libraries
# ovrlay overlay-manager library
# emu|fp87 floating-point libraries (choose one)
# mathx math library for memory model x
# Cl run-time library for memory model l (large)
# Vt Undocumented -- compress debugging information
#
# Some of these symbols are included in $(LFLAGS) and $(LNKLIBS), and
# the rest are on the command line.
#
# NOTE the use of the faster FP87 library in lieu of the EMU library;
# the code will run only if the PC has an 80x87 installed. Also note
# that EMU might run slower on a 486 than on a 386. Don't know for sure
# yet.
#
# NOTE that we have to be sure the FACE library also uses only 80x87
# code. This is very important.
#
########################################################################
LNK = tlink
USRLIBS = $(PROJ)
LNKLIBS = graphics emu tv mathl cl
!if $d(ebug)
LFLAGS = /c /l /v /Vt /s /L$(USR);$(BCL);$(TVL) C0l
!else
LFLAGS = /v /x /c /P- /L$(BCL);$(USR);$(TVL) C0l
!endif
########################################################################
#
# =================
# Borland Librarian
# =================
#
# /C Do not ignore the case of symbols; however, some linkers do
# not distinguish between cases, and they won't handle a library
# created with the /C option very well.
#
########################################################################
LLIB = tlib
LBFLAGS = /C
########################################################################
#
# Implicit Inference rules for Borland 3.1 C/C++
#
# Some inference rules take advantage of Borland 3.1 Make's "batching"
# facility, wherein any file enclosed by curly braces is added to a
# list, so that the command need only be called once.
#
########################################################################
.asm.obj:
$(AS) $(AFLAGS) $*;
.c.obj:
$(CC) -c $(CFLAGS) {$< }
.cpp.obj:
$(CC) -c $(CFLAGS) {$< }
########################################################################
#
# Individual File Dependencies
#
# For those files with nested dependencies, we define some macros
# INCS is all of them, lumped together for easy reference
#
########################################################################
########################################################################
#
# FACE_TV modules
#
########################################################################
RBUTOBJS= \
grafxlog.obj \
korbutt.obj \
math_aux.obj \
mkbutton.obj \
msrbutt.obj \
rbuttons.obj \
respintr.obj \
respwind.obj
LIBOBJS = \
announce.obj \
boxtools.obj \
dlg_box.obj \
dosshell.obj \
filedlg.obj \
heapview.obj \
menubars.obj \
screnmsg.obj \
scrnmsg.obj \
tbox.obj \
timerctl.obj \
tinpextd.obj \
tinpmous.obj \
tinput.obj \
tmouse.obj \
tv_confg.obj \
tvscreen.obj \
$(RBUTOBJS)
RBUTINCS= \
grafxlog.h \
korbutt.h \
math_aux.obj \
mkbutton.h \
msrbutt.h \
rbuttons.h \
respintr.h \
respwind.h \
respvga.h
FACEINCS = \
announce.h \
boxtools.h \
bytebox.h \
bytemenu.h \
compiler.h \
dlg_box.h \
dosshell.h \
filedlg.h \
heapview.h \
menubars.h \
screnmsg.h \
tbox.h \
timerctl.h \
tinpextd.h \
tinpmous.h \
tinput.h \
tmouse.h \
tv_confg.h \
tv_menu.h \
tvmenus.h \
tvscreen.h \
tvyesno.h \
$(RBUTINCS)
########################################################################
#
# Isolated header files
#
########################################################################
BYTEMENU= bytemenu.h
BOXTOOLS= boxtools.h
COMPILER= compiler.h
DLG_BOX = dlg_box.h tv_box.h
DOSSHELL= dosshell.h
FILEDLG = filedlg.h
GRAFXLOG= grafxlog.h grafxscr.h bios_vid.h
HEAPVIEW= heapview.h
MENUBARS= menubars.h
PROJDEPS= $(PROJ).cpp $(PROJ).h $(PROJ).men $(PROJ).cfg
RBUTTONS= rbuttons.h
SCRENMSG= screnmsg.h cnscreen.h tvscreen.h
TIMERCTL= timerctl.h
TINPEXTD= tinpextd.h
TINPMOUS= tinpmous.h
TINPUT = tinput.h
TMOUSE = tmouse.h
TV_MENU = tv_menu.h datatype.h
TVMENUS = tvmenus.h
TVSCREEN= tvscreen.h
TV_CONFG= tv_confg.h tv_confg.err
RESPINTR= respintr.h respvga.h
RESPWIND= respwind.h respintr.h screen.h
KORBUTT = korbutt.h $(RBUTTONS)
MSRBUTT = msrbutt.h $(RBUTTONS)
########################################################################
#
# Explicit Rules
#
# Note the @&&| and | which bracket the contents of a temporary
# file that Borland's MAKE creates.
#
########################################################################
all: $(PROJ).exe usrlib
$(PROJ).exe: $(PROJ).obj $(PROJ).arf $(PROJ).lib
$(LNK) $(LFLAGS) @$(PROJ).arf
$(PROJ).arf: $(INCS) makefile
@echo $(PROJ) > $(PROJ).arf
@echo $(PROJ) >> $(PROJ).arf
@echo $(PROJ) >> $(PROJ).arf
@echo $(USRLIBS) $(LNKLIBS) >> $(PROJ).arf
@echo $(PROJ) test code automatic response file created.
$(PROJ).lib: $(LIBOBJS) $(PROJ).cfg face_lib.arf
del $(PROJ).lib
$(LLIB) $(LBFLAGS) $(PROJ) @face_lib.arf
usrlib: $(PROJ).lib
copy *.err $(USR)
copy *.h $(USR)
copy *.lib $(USR)
########################################################################
#
# Configuration file for the librarian
#
########################################################################
face_lib.arf: makefile
@echo +announce & > face_lib.arf
@echo +boxtools & >> face_lib.arf
@echo +dlg_box & >> face_lib.arf
@echo +dosshell & >> face_lib.arf
@echo +filedlg & >> face_lib.arf
@echo +grafxlog & >> face_lib.arf
@echo +heapview & >> face_lib.arf
@echo +korbutt & >> face_lib.arf
@echo +math_aux & >> face_lib.arf
@echo +menubars & >> face_lib.arf
@echo +mkbutton & >> face_lib.arf
@echo +msrbutt & >> face_lib.arf
@echo +rbuttons & >> face_lib.arf
@echo +respintr & >> face_lib.arf
@echo +respwind & >> face_lib.arf
@echo +screnmsg & >> face_lib.arf
@echo +scrnmsg & >> face_lib.arf
@echo +tbox & >> face_lib.arf
@echo +timerctl & >> face_lib.arf
@echo +tinpextd & >> face_lib.arf
@echo +tinpmous & >> face_lib.arf
@echo +tinput & >> face_lib.arf
@echo +tmouse & >> face_lib.arf
@echo +tv_confg & >> face_lib.arf
@echo +tvscreen >> face_lib.arf
@echo $(PROJ) automatic response file created
########################################################################
#
# Hierarchical header files (careful about changing the order of these)
#
########################################################################
TBOX = tbox.h $(TV_MENU) $(TINPUT) $(TINPMOUS)
ANNOUNCE= announce.h $(BOXTOOLS) $(TINPUT)
########################################################################
#
# Object modules to construct
#
########################################################################
announce.obj: announce.cpp $(ANNOUNCE) $(PROJ).cfg
boxtools.obj: boxtools.cpp $(BOXTOOLS) $(PROJ).cfg
dlg_box.obj: dlg_box.cpp $(DLG_BOX) $(PROJ).cfg
dosshell.obj: dosshell.cpp $(DOSSHELL) $(PROJ).cfg
grafxlog.obj: grafxlog.c $(GRAFXLOG) $(PROJ).cfg
filedlg.obj: filedlg.cpp $(FILEDLG) $(PROJ).cfg
heapview.obj: heapview.cpp $(HEAPVIEW) $(PROJ).cfg
korbutt.obj: korbutt.cpp korbutt.h $(RBUTTONS) $(PROJ).cfg
math_aux.obj: math_aux.c math_aux.h $(PROJ).cfg
menubars.obj: menubars.cpp $(MENUBARS) $(PROJ).cfg
mkbutton.obj: mkbutton.cpp mkbutton.h $(MSRBUTT) $(KORBUTT) $(PROJ).cfg
msrbutt.obj: msrbutt.cpp msrbutt.h $(RBUTTONS) tmouse.h $(PROJ).cfg
respintr.obj: respintr.cpp $(RESPINTR) $(PROJ).cfg
respwind.obj: respwind.cpp $(RESPWIND) $(PROJ).cfg
screnmsg.obj: screnmsg.cpp $(SCRENMSG) $(PROJ).cfg
scrnmsg.obj: scrnmsg.c $(SCRENMSG) $(PROJ).cfg
rbuttons.obj: rbuttons.cpp $(RBUTTONS) $(PROJ).cfg
tbox.obj: tbox.cpp $(TBOX) $(PROJ).cfg
timerctl.obj: timerctl.cpp $(TIMERCTL) $(PROJ).cfg
tinpextd.obj: tinpextd.cpp $(TINPEXTD) $(TMOUSE) $(PROJ).cfg
tinpmous.obj: tinpmous.cpp $(TINPMOUS) $(TMOUSE) $(PROJ).cfg
tinput.obj: tinput.cpp $(TINPUT) $(PROJ).cfg
tmouse.obj: tmouse.c $(TMOUSE) $(PROJ).cfg
tv_confg.obj: tv_confg.cpp $(TV_CONFG) $(PROJ).cfg
tvscreen.obj: tvscreen.cpp $(TVSCREEN) $(PROJ).cfg
$(PROJ).obj: $(PROJDEPS) face_box.men announce.h
########################################################################
#
# Compiler Configuration File
#
# The "&&" says to route the following lines to the file specified
# after the pair of "|" characters. (Any character besides "|" could
# be used to bracket the text).
#
# -b- seems to screw up the program (creates byte array indices?)
# -1 seems to screw up a small section of code when running the
# debugger; anyway, I want even 8086 machines to be able to
# run this code, so "-1-" is used.
# -vi- why is this here???????
#
########################################################################
$(PROJ).cfg: makefile
copy &&|
-1-
-ml
-vi-
-i31
-w-ret
-w-nci
-w-inl
-wpin
-wamb
-wamp
-w-par
-wasm
-wcln
-w-cpt
-wdef
-w-dup
-w-pia
-wsig
-wnod
-w-ill
-w-sus
-wstv
-wucp
-wuse
-w-ext
-w-ias
-w-ibc
-w-pre
-w-nst
-D$(FP)
-D$(TESTFLG);$(HEAPFLG)
-I$(INCLUDEPATH);$(USR)
-L$(BCL);$(TVL)
| $(PROJ).cfg
########################################################################
#
# Other convenient targets
#
########################################################################
clean:
del *.map
del *.obj
del *.bak
touch:
touch *.cpp
touch *.h
touch *.men
del $(PROJ).cfg
del $(PROJ).arf
del face_lib.arf
help: hlp
@type hlp
hlp: makefile
@echo "make [options] [target]" > hlp
@echo The options and targets are: >> hlp
@echo touch Touch files to change compiler options >> hlp
@echo clean Delete junk files (MAP, OBJ, etc.) >> hlp
@echo -Debug Compile for debugging under CodeView >> hlp
@echo -Dtest Compile to run without board >> hlp
@echo -Dheap Compile to run with heap checker >> hlp