home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 17
/
CD_ASCQ_17_101194.iso
/
vrac
/
ve2tv103.zip
/
DEMO.MAK
< prev
next >
Wrap
Text File
|
1994-08-03
|
12KB
|
446 lines
#// File : DEMO.MAK
#// Author : Eric Woodruff, CIS ID: 72134,1150
#// Updated : Sun 07/31/94 15:56:28
#// Note : Copyright 1994, Eric Woodruff, All rights reserved
#// Compiler: Borland C++ 3.1 to 4.02
#//
# Makefile for building the TVMEditor 2.0 demo. Unless overridden by
# command line flags, this will generate real mode, non-overlay executables.
#
# File location assumptions:
#
# Directory Tree for TVMEditor 2.0:
# TVMEDIT2 - Base directory. The name is not significant.
# The source and library files are found here.
# The executables are left here after the build.
# TVMEDIT2\SOURCE - Location of TVIRTMEM.H (Registered Version)
# TVMEDIT2\OBJ??? - Object file dir(s) generated by the build.
# Each build uses a unique name for the object dir
# associated with the executables being created.
# Once the demo(s) are built, you can delete these.
#
# ** NOTE: Run the make file from the base directory (i.e. TVMEDIT2 above).
#
# MAKE with:
#
# No command line flags:
# Compile for Borland C++ 4.0/4.02 using Turbo Vision 2.0
# Executables created will be for real mode, non-overlay.
# Directories: Compiler Root: D:\BC4
# Include: D:\BC4\INCLUDE
# Libraries: D:\BC4\LIB
# TV Include: D:\BC4\INCLUDE\TVISION
#
# -DBC31
# Compile for Borland C++ 3.1 using Turbo Vision 1.03
# Executables created will be for real mode, non-overlay.
# Directories: Compiler Root: D:\BC
# Include: D:\BC\INCLUDE
# Libraries: D:\BC\LIB;D:\BC\TVISION\LIB
# TV Include: D:\BC\TVISION\INCLUDE
#
# -DTV103
# Compile for Borland C++ 4.0/4.02 using Turbo Vision 1.03
# Executables created will be for real mode, non-overlay.
# Directories: Compiler Root: D:\BC4
# Include: D:\BC4\INCLUDE
# Libraries: D:\BC4\LIB;D:\BC4\TVISION\LIB
# TV Include: D:\BC4\TVISION\INCLUDE
#
# Flags for DEMO.MAK:
#
# These command line switches alter the build flags used during
# compilation. You can use them to alter the build characteristics or you
# can edit the default option flag settings in the make file down below.
#
# -DBC31 Build using Borland C++ 3.1
# TV103 is automatically defined to use Turbo Vision 1.03
# If not specified, Borland C++ 4.0/4.02 is assumed
#
# -DTV103 Build for TV 1.03
# If not specified, TV 2.0 is assumed (unless -DBC31 is
# specified)
#
# -DCPU286 Build demo for the 80286 and up (CPUFLAG = -2)
# If not specified, compile for 8088 (CPUFLAG = -1- -2-)
# NOTE:
# If -DDOS16 (DPMI16), automatic CPUFLAG = -2
# If -DDOS32 (DPMI32), automatic CPUFLAG = -3
#
# -DOVERLAY Build using overlayable version - TVMEDITO.LIB and
# TVMEDTNO.LIB
#
# -DDOS16 Build using 16-bit DPMI version - TVMED16.LIB
# BC++ 4.02 and Power Pack required
#
# -DDOS32 Build using 32-bit DPMI version - TVMED32.LIB
# BC++ 4.02 and Power Pack required
#
# -DDEBUG Include full debug info in the demos, turn off all
# optimizations, and enable the editor diagnostic checks.
# Library name used depends on the above settings:
# TVMEDITD.LIB - Real mode, non overlay
# TVMEDOD.LIB - Real mode, overlay
# TVMED16D.LIB - 16-bit protected mode
# TVMED32D.LIB - 32-bit protected mode
#
# -DBCROOT=... Specifies the path where you installed the compiler
# (i.e. C:\BC, C:\BC4, D:\BORLANDC, etc.)
#
# -DTVINC=... Specifies the path where you installed Turbo Vision's
# header files
# (i.e. C:\BC\TVISION\INCLUDE, C:\AF\INCLUDE, etc.)
#
# -DTVLIB=... Specifies the path where you installed Turbo Vision's
# library files (i.e. \BC\TVISION\LIB or \BC4\LIB)
#
# -DALIGNMENT=2 Optional word (=2) or dword (=4) aligned library. Only
# -DALIGNMENT=4 use it if you have word or dword aligned libraries!
#
# Examples:
# make -fdemo - Real mode using BC4/TV 2.0
# make -fdemo -DTV103 - Real mode using BC4/TV 1.03
# make -fdemo -DBC31 - Real mode using BC3.1/TV 1.03
#
# make -fdemo -DCPU286 - Real mode, BC4/TV 2.0, compiled for 286
# make -fdemo -DOVERLAY -DCPU286 - Overlayed, BC4/TV 2.0, for 286
# make -fdemo -DDOS16 - 16 bit DPMI
# make -fdemo -DDOS32 - 32 bit DPMI
# make -fdemo -DDOS32 -DDEBUG - 32 bit DPMI with full debug info
#
.autodepend
.swap
.silent
# ****************** Uncomment the appropriate lines to default to a
# ****************** specific build mode.
# The value assigned is not important. It's just to get the defintion
# into existence. If all are commented out, it defaults to BC++ 4.0/4.02
# with Turbo Vision 2.0.
# BC31 =
# TV103 =
# Enforce TV 1.03 if BC31 is defined.
!if $d(BC31) && !$d(TV103)
TV103 =
!endif
# ****************** Here's where to adjust file locations for TV 1.03
!if $d(TV103)
!if !$d(BCROOT)
!if $d(BC31)
BCROOT = D:\BC
!else
BCROOT = D:\BC4
!endif
!endif
!if !$d(TVINC)
!if $d(BC31)
TVINCDIR = D:\BC\TVISION\INCLUDE
!else
TVINCDIR = D:\BC4\TVISION\INCLUDE
!endif
!endif
!if !$d(TVLIB)
!if $d(BC31)
TVLIBDIR = D:\BC\TVISION\LIB
!else
TVLIBDIR = D:\BC4\TVISION\LIB
!endif
!endif
!else
# ****************** Here's where to adjust file locations for TV 2.0
!if !$d(BCROOT)
BCROOT = D:\BC4
!endif
!if !$d(TVINC)
TVINCDIR = D:\BC4\INCLUDE\TVISION
!endif
!if !$d(TVLIB)
TVLIBDIR =
!endif
!endif
# Set include file and library locations.
INCLUDE = $(BCROOT)\INCLUDE;$(TVINCDIR);.;.\SOURCE
LIBDIR = $(BCROOT)\LIB;$(TVLIBDIR)
# ******************* Set up for 32 bit protected mode compile
!if $d(DOS32)
!if $d(DEBUG)
CFGNAME = DEMO32D.CFG
LIBNAME = TVMED32D.LIB
OBJDIR = OBJS32D
!else
CFGNAME = DEMO32.CFG
LIBNAME = TVMED32.LIB
OBJDIR = OBJS32
!endif
CPUFLAG = -3
TARGETFLAG = -WX
LINKFLAGS = /Tpe /ax
STARTUP = c0x32.obj
USERLIBS = $(LIBNAME) tv32.lib
STDLIBS = dpmi32.lib cw32.lib
CC = BCC32
LIB = TLIB
LINK = TLINK32
!else # DOS32
# ******************* Set up for 16 bit protected mode compile
!if $d(DOS16)
!if $d(DEBUG)
CFGNAME = DEMO16D.CFG
LIBNAME = TVMED16D.LIB
OBJDIR = OBJS16D
!else
CFGNAME = DEMO16.CFG
LIBNAME = TVMED16.LIB
OBJDIR = OBJS16
!endif
CPUFLAG = -2
TARGETFLAG = -WX -ml
LINKFLAGS = /Txe
STARTUP = c0x.obj
USERLIBS = $(LIBNAME) tv.lib
STDLIBS = dpmi16.lib emux.lib mathwl.lib cwl.lib
CC = BCC
LIB = TLIB
LINK = TLINK
!else # DOS16
# ******************* Set up for real mode compile
!if $d(DEBUG)
!if $d(OVERLAY)
CFGNAME = DEMOVYD.CFG
LIBNAME = TVMEDOD.LIB
OBJDIR = OBJSOD
!else
CFGNAME = DEMOD.CFG
LIBNAME = TVMEDITD.LIB
OBJDIR = OBJSD
!endif
!else
!if $d(OVERLAY)
CFGNAME = DEMOVY.CFG
LIBNAME = TVMEDITO.LIB
NOVLLIB = TVMEDTNO.LIB
OBJDIR = OBJSO
!else
CFGNAME = DEMO.CFG
LIBNAME = TVMEDIT.LIB
OBJDIR = OBJS
!endif
!endif
# Set CPU type being compiled for in real mode.
!if $d(CPU286)
CPUFLAG = -2
!else
CPUFLAG = -1- -2-
!endif
TARGETFLAG = -ml
LINKFLAGS =
STARTUP = c0l.obj
USERLIBS = $(LIBNAME) tv.lib
STDLIBS = emu.lib mathl.lib cl.lib
!if $d(OVERLAY)
USERLIBS = $(LIBNAME) tvo.lib
STDLIBS = $(NOVLLIB) tvno.lib overlay.lib emu.lib mathl.lib cl.lib
!endif
CC = BCC
LIB = TLIB
LINK = TLINK
!endif # DOS16
!endif # DOS32
# ******************* Set other compiler options
LINKOVY_ON =
LINKOVY_OFF =
!if $d(OVERLAY)
!if !$d(DOS16) && !$d(DOS32)
!if $d(BC31)
CCOVYFLAGS = -Y -Vs -Vb -B
!else
CCOVYFLAGS = -Y -Vs
!endif
LINKOVY_ON = /o+
LINKOVY_OFF = /o-
!else
!error There's no need to use overlays with the 16-bit or 32-bit DPMI versions.
!endif
!endif
!if $d(ALIGNMENT)
ALIGNFLAG = -a$(ALIGNMENT)
!else
ALIGNFLAG =
!endif
# ******************* Set debug and optimization options
CFLAGS1 =
CFLAGSN32 =
!if $d(DEBUG)
CDEBUGFLAG = /v -k -N
LINKFLAGS = $(LINKFLAGS) /v
!else
CDEBUGFLAG = /v- /DNDEBUG -k- -N- -G-
# These optimization options **cannot** be used for 32-bit
# protected mode due to compiler bugs.
!if !$d(DOS32)
CFLAGSN32 = -h -Oe -Os -O -Ob -Ol -Z
!endif
!endif
# Turn off exceptions and RTTI if using BC++ 4.0/4.02
!if !$d(BC31)
CFLAGS1 = $(CFLAGS1) -RT- -x-
!endif
# Put them all together. Compiler options are spread across three definitions
# because they can exceed 128 characters per line which causes it to fail.
CFLAGS1 = $(CFLAGS1) -ff -w -w-sig -w-amp -P -n$(OBJDIR) /DINCLUDE_HEAPVIEW
CFLAGS2 = $(CDEBUGFLAG) $(ALIGNFLAG) $(CCOVYFLAGS) $(CPUFLAG) $(CFLAGSN32)
CFLAGS3 = -I$(INCLUDE) /DSHAREWARE
# ******************* Build dependencies
!if $d(DOS32)
DEMONAME = TVEDIT32
!else
!if $d(DOS16)
DEMONAME = TVEDIT16
!else
DEMONAME = TVEDIT
!endif
!endif
#.path.obj = $(OBJDIR)
RSCLST = BLDRSC.OBJ \
TFILENM.OBJ \
TINTEGER.OBJ
DEMOLST = TVEDIT1.OBJ \
TVEDIT2.OBJ \
TVEDIT3.OBJ \
TMACRO.OBJ \
HEAPVIEW.OBJ \
TMSGVIEW.OBJ \
TFILENM.OBJ \
MAPCOLOR.OBJ \
TINTEGER.OBJ
# Go ahead and build them.
.cpp.obj:
$(CC) -c +$(CFGNAME) {$< }
all: $(CFGNAME) dirs bldrsc.exe $(DEMONAME).rsc $(DEMONAME).exe
dirs:
echo !!
echo !! IF YOU ARE USING BC++ 3.1, RENAME TVMEDIT.BC3 TO TVMEDIT.LIB FIRST!
echo !!
echo !! IF YOU ARE USING BC++ 4.0, RENAME TVMEDIT.BC4 TO TVMEDIT.LIB FIRST!
echo !!
IF NOT EXIST $(OBJDIR) MD $(OBJDIR)
$(CFGNAME): demo.mak
ECHO $(TARGETFLAG) $(CFLAGS1) > $(CFGNAME)
ECHO $(CFLAGS2) >> $(CFGNAME)
ECHO $(CFLAGS3) >> $(CFGNAME)
bldrsc.exe: dirs $(CFGNAME) $(RSCLST)
$(LINK) @&&|
$(LINKFLAGS)/L$(LIBDIR) + # linker options
$(STARTUP) + # startup code
$(OBJDIR)\bldrsc.obj + # object files
$(OBJDIR)\tfilenm.obj +
$(OBJDIR)\tinteger.obj
bldrsc # exe name
bldrsc # mapfile
$(LINKOVY_ON) $(USERLIBS) + # overlayable libraries
$(LINKOVY_OFF) $(STDLIBS) # non-overlayable libraries
|
$(DEMONAME).rsc: bldrsc.exe
bldrsc
$(DEMONAME).exe: dirs $(CFGNAME) $(DEMOLST)
$(LINK) @&&|
$(LINKFLAGS)/L$(LIBDIR) + # linker options
$(STARTUP) + # startup code
$(OBJDIR)\tvedit1.obj + # object files
$(OBJDIR)\tvedit2.obj +
$(OBJDIR)\tvedit3.obj +
$(OBJDIR)\tmacro.obj +
$(OBJDIR)\tmsgview.obj +
$(OBJDIR)\heapview.obj +
$(OBJDIR)\tfilenm.obj +
$(OBJDIR)\mapcolor.obj +
$(OBJDIR)\tinteger.obj
$(DEMONAME) # exe name
$(DEMONAME) # mapfile
$(LINKOVY_ON) $(USERLIBS) + # overlayable libraries
$(LINKOVY_OFF) $(STDLIBS) # non-overlayable libraries
|
$(OBJDIR)\bldrsc.obj: $(CFGNAME) bldrsc.cpp
$(OBJDIR)\tvedit1.obj: $(CFGNAME) tvedit1.cpp
$(OBJDIR)\tvedit2.obj: $(CFGNAME) tvedit2.cpp
$(OBJDIR)\tvedit3.obj: $(CFGNAME) tvedit3.cpp
$(OBJDIR)\tmacro.obj: $(CFGNAME) tmacro.cpp
$(OBJDIR)\tmsgview.obj: $(CFGNAME) tmsgview.cpp
$(OBJDIR)\heapview.obj: $(CFGNAME) heapview.cpp
$(OBJDIR)\tfilenm.obj: $(CFGNAME) tfilenm.cpp
$(OBJDIR)\tinteger.obj: $(CFGNAME) tinteger.cpp
$(OBJDIR)\mapcolor.obj: $(CFGNAME) mapcolor.cpp
# End of TVMEditor 2.0 demo program make file