#
#	Command & Conquer(tm)
#	Copyright 2025 Electronic Arts Inc.
#
#	This program is free software: you can redistribute it and/or modify
#	it under the terms of the GNU General Public License as published by
#	the Free Software Foundation, either version 3 of the License, or
#	(at your option) any later version.
#
#	This program is distributed in the hope that it will be useful,
#	but WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#	GNU General Public License for more details.
#
#	You should have received a copy of the GNU General Public License
#	along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

#* $Header$
#*********************************************************************************************** 
#***              C O N F I D E N T I A L  ---  W E S T W O O D  S T U D I O S               *** 
#*********************************************************************************************** 
#*                                                                                             * 
#*                 Project Name : Command & Conquer                                            * 
#*                                                                                             * 
#*                    File Name : MAKEFILE                                                     * 
#*                                                                                             * 
#*                   Programmer : Joe L. Bostic                                                * 
#*                                                                                             * 
#*                   Start Date : 03/02/95                                                     * 
#*                                                                                             * 
#*                  Last Update : March 2, 1995 [JLB]                                          * 
#*                                                                                             * 
#*---------------------------------------------------------------------------------------------* 
#* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *

.SILENT
.OPTIMIZE
.ERASE

#---------------------------------------------------------------------------
# Verify user's environment
#---------------------------------------------------------------------------
!ifndef %WWFLAT
WWFLAT=c:\wwflat32
#!error WWFLAT must be set to the root of the library directory.
!else
WWFLAT=$(%WWFLAT)
!endif

!ifndef %WATCOM 
WATCOM=c:\projects\c&c\code\watcom
#!error WATCOM must be set to the Watcom root directory.
!else
WATCOM=$(%WATCOM)
!endif

#---------------------------------------------------------------------------
# Path macros: one path for each file type.
#  These paths are used to tell make where to find/put each file type.
#---------------------------------------------------------------------------
.asm:  .
.c:    .
.cpp:  .
.h:    .
#.obj:  obj
.obj:  r:
.lib:  $(WWFLAT)\lib
.exe:  ..\run


#===========================================================================
# Flags for the different project assembly tools.
#===========================================================================
CC_CFG = /i=..\vq\include					# Includes player (VQ) directory.
CC_CFG += /i=$(WWFLAT)\INCLUDE			# Normal library include directory.
CC_CFG += /i=watcom\H						# Normal Watcom include directory.
CC_CFG += /i=..\gcl510\H					# Includes Greenleaf headers.
CC_CFG += /d2									# Debugging information.
CC_CFG += /of+									# Generate tracable stack frames.
CC_CFG += /zp1									# Pack structures on byte boundary.
CC_CFG += /5s									# Pentium optimized stack calling conventions.
CC_CFG += /xs									# Exception handling enabled.
CC_CFG += /s									# Remove stack check calls.
CC_CFG += /j									# char is now signed.
CC_CFG += /fh=conquer.pch					# Use precompiled headers.
CC_CFG += /we									# Treat all warnings as errors.
CC_CFG += /w8									# Most warnings enabled.
CC_CFG += /ri									# char and shorts are returned as int.
CC_CFG += /zq									# Operate quietly.
CC_CFG += /zm									# Each routine to be in its own segment.
CC_CFG += /zld									# Disable autodependency information in object file.
CC_CFG += /od									# *** Disable all optimizations ***
CC_CFG += /DDOS4G								# Must be defined for Greenleaf
CC_CFG += /DGF_WATCOM_S						# Must be defined for Greenleaf with /3s
CC_CFG += /ol									# Loop optimizations enabled.
CC_CFG += /or									# Reorder instructions for best pipeline usage.
CC_CFG += /oe									# Inline is enabled.
CC_CFG += /oi									# Expand intrisic functions inline.
CC_CFG += /on									# Allow numerically unstable operations.
CC_CFG += /oo									# Compile even if low on memory (i.e. less than 64meg).
CC_CFG += /oa									# Relax aliasing constraints.
#CC_CFG += /ot									# Speed is more important than space optimizations.
#CC_CFG += /fi=watcom.h						# Special Watcom control file.

ASM_CFG = /i$(WWFLAT)\INCLUDE			# Include directory.
ASM_CFG += /zd									# Debugging information line numbers.
ASM_CFG += /t									# Quiet operation.
ASM_CFG += /m									# Allow multiple passes.
ASM_CFG += /w+									# Enable maximum warnings.
ASM_CFG += /jJUMPS							# Enable jump optimizations.
ASM_CFG += /ml									# Case sensitivity on code.
#ASM_CFG += /zi									# Full debugging information.


#---------------------------------------------------------------------------
# Implicit rules
# Compiler: 
# 	($< = full dependent with path)
# Assembler:
# 	output obj's are constructed from .obj: & the $& macro
# 	($< = full dependent with path)
# 	tasm's cfg file is not invoked as a response file.
#---------------------------------------------------------------------------

.c.obj:#.AUTODEPEND 
	echo Compiling $<
	*watcom\wcc $(C_CFG) -foobj\$^. $<

.cpp.obj: #.AUTODEPEND 
	echo Compiling $<
!ifdef %NETWORK
	f:\projects\c&c\slaves\NETEXEC /v $(%NETWHO)c $^&
	if exist $(%CCNETDIR)\code\netmake.err %abort
!else
	*watcom\wpp386 $(CC_CFG) -foobj\$^. $<
!endif

.asm.obj: 
	echo Assembling $<
!ifdef %NETWORK
	f:\projects\c&c\slaves\NETEXEC /v $(%NETWHO)a $^&
!else
	watcom\tasm32 $(ASM_CFG) $<, obj\$^.
!endif

#---------------------------------------------------------------------------
# Project-dependent variables
#---------------------------------------------------------------------------
OBJECTS = &
	AADATA.OBJ &
	ABSTRACT.OBJ &
	ADATA.OBJ &
	AIRCRAFT.OBJ &
	ANIM.OBJ &
	AUDIO.OBJ &
	BASE.OBJ &
	BBDATA.OBJ &
	BDATA.OBJ &
	BUILDING.OBJ &
	BULLET.OBJ &
	CARGO.OBJ &
	CCFILE.OBJ &
	CDATA.OBJ &
	CDFILE.OBJ &
	CELL.OBJ &
	CHEKLIST.OBJ &
	COLRLIST.OBJ &
	COMBAT.OBJ &
	COMBUF.OBJ &
	CONFDLG.OBJ &
	CONNECT.OBJ &
	CONQUER.OBJ &
	CONST.OBJ &
	CONTROL.OBJ &
	COORD.OBJ &
	COORDA.OBJ &
	CREDITS.OBJ &
	CREW.OBJ &
	DEBUG.OBJ &
	DESCDLG.OBJ &
	DIAL8.OBJ &
	DIALOG.OBJ &
	DISPLAY.OBJ &
	DPMI.OBJ &
	DRIVE.OBJ &
	EDIT.OBJ &
	EVENT.OBJ &
	FACING.OBJ &
	FACTORY.OBJ &
	FINDPATH.OBJ &
	FLASHER.OBJ &
	FLY.OBJ &
	FOOT.OBJ &
	FUSE.OBJ &
	GADGET.OBJ &
	GAMEDLG.OBJ &
	GAUGE.OBJ &
	GLOBALS.OBJ &
	GOPTIONS.OBJ &
	GSCREEN.OBJ &
	HDATA.OBJ &
	HEAP.OBJ &
	HELP.OBJ &
	HOUSE.OBJ &
	IDATA.OBJ &
	INFANTRY.OBJ &
	INI.OBJ &
	INIT.OBJ &
	INTRO.OBJ &
	IOMAP.OBJ &
	IOOBJ.OBJ &
	IPX.OBJ &
	IPXADDR.OBJ &
	IPXCONN.OBJ &
	IPXGCONN.OBJ &
	IPXMGR.OBJ &
	IPXPROT.OBJ &
	JSHELL.OBJ &
	KEYFBUFF.OBJ &
	KEYFRAME.OBJ &
	LAYER.OBJ &
	LINK.OBJ &
	LIST.OBJ &
	LOADDLG.OBJ &
	LOGIC.OBJ &
	MAP.OBJ &
	MAPEDDLG.OBJ &
	MAPEDIT.OBJ &
	MAPEDPLC.OBJ &
	MAPEDSEL.OBJ &
	MAPEDTM.OBJ &
	MAPSEL.OBJ &
	MENUS.OBJ &
	MISSION.OBJ &
	MIXFILE.OBJ &
	MONOC.OBJ &
	MOUSE.OBJ &
	MPLAYER.OBJ &
	MSGBOX.OBJ &
	MSGLIST.OBJ &
	NETDLG.OBJ &
	NOSEQCON.OBJ &
	NULLCONN.OBJ &
	NULLDLG.OBJ &
	NULLMGR.OBJ &
	OBJECT.OBJ &
	ODATA.OBJ &
	OPTIONS.OBJ &
	OVERLAY.OBJ &
	POWER.OBJ &
	PROFILE.OBJ &
	QUEUE.OBJ &
	RADAR.OBJ &
	RADIO.OBJ &
	RAND.OBJ &
	RAWFILE.OBJ &
	REINF.OBJ &
	SAVELOAD.OBJ &
	SCENARIO.OBJ &
	SCORE.OBJ &
	SCROLL.OBJ &
	SDATA.OBJ &
	SHAPEBTN.OBJ &
	SIDEBAR.OBJ &
	SLIDER.OBJ &
	SMUDGE.OBJ &
	SOUNDDLG.OBJ &
	STARTUP.OBJ &
	SUPPORT.OBJ &
	TAB.OBJ &
	TARCOM.OBJ &
	TARGET.OBJ &
	TDATA.OBJ &
	TEAM.OBJ &
	TEAMTYPE.OBJ &
	TECHNO.OBJ &
	TEMPLATE.OBJ &
	TERRAIN.OBJ &
	TEXTBTN.OBJ &
	THEME.OBJ &
	TOGGLE.OBJ &
	TRIGGER.OBJ &
	TURRET.OBJ &
	TXTLABEL.OBJ &
	TXTPRNT.OBJ &
	UDATA.OBJ &
	UNIT.OBJ &
	VECTOR.OBJ &
	VISUDLG.OBJ

PROJ_LIBS = &
	wwflat32.lib

VQ_LIBS = &
	vqa32wp.lib &
	vqm32wp.lib

GCL_LIBS = &
	gclfr3s.lib
	

############################################################################
# Pre-compilation process. Move old files to backup directory and switch
# to monochrome screen.
.BEFORE
	mode mono
	-if exist *.pch del *.pch
	-if exist $(%CCNETDIR)\code\netmake.err del $(%CCNETDIR)\code\netmake.err
	-if exist *.bak move *.bak bak

# Switch back to normal screen at compilation end.
.AFTER
	mode co80

# Switch back to normal screen if there was an error.
.ERROR
	mode co80


#############################################################################
# Default target
all:	conquer.exe 


#############################################################################
# Builds the stub replacement program.
CWSTUB.OBJ: CWSTUB.C
	*watcom\wcc /i=watcom\h /dQUIET /dVMM /ms /zQ -foobj\$^. $<

CWSTUB.EXE: CWSTUB.OBJ
	*watcom\wlink system dos file obj\cwstub.obj name cwstub.exe option quiet library watcom\lib286\dos\clibs.lib, watcom\lib286\math87s.lib, watcom\lib286\dos\emu87.lib


#############################################################################
# Build the EXE
conquer.exe: $(OBJECTS)  cwstub.exe conquer.lnk $(WWFLAT)\lib\wwflat32.lib

	 Echo "conquer.exe" linking phase.
!ifdef %NETWORK
	 echo Waiting for objects...
	 for %index in ($(OBJECTS)) do WAITFILE $(%CCNETDIR)\code\obj\%index
#	 copy $(%CCNETDIR)\code\obj\*.obj $(%CCLOCALDIR)\code\obj /U
	 copy $(%CCNETDIR)\code\obj\*.obj r: /U
!endif
	 watcom\wlink name ..\run\$@ @conquer.lnk
	 Echo "conquer.exe" executable completed.
!ifdef %WWOBJ
	 xcopy /M $(WWOBJ)obj\*.obj obj
!endif
#	 watcom\wlink $(LINK_CFG) name ..\run\$@ @conquer.lnk
			 
#############################################################################
# This creates the linker command file.
conquer.lnk : makefile
	%create $^@
	%append $^@ system dos4g
	%append $^@ debug all
	%append $^@ option stack=8k
	%append $^@ option redefsok
	%append $^@ option quiet
	%append $^@ option map
	%append $^@ option cache
	%append $^@ option eliminate
	%append $^@ option caseexact
#	%append $^@ option stub=cwstub.exe
#	for %index in ($(OBJECTS))  do %append $^@ file obj\%index
	for %index in ($(OBJECTS))  do %append $^@ file r:\%index
	for %index in ($(PROJ_LIBS)) do %append $^@ library $(WWFLAT)\lib\%index
	for %index in ($(VQ_LIBS)) do %append $^@ library ..\vq\lib\%index
	for %index in ($(GCL_LIBS)) do %append $^@ library ..\gcl510\w10\%index

bind: .SYMBOLIC
	-copy ..\run\conquer.exe ..\run\temp.exe
	-wstrip ..\run\temp.exe
	-watcom\4gwbind watcom\4gwpro.exe ..\run\temp.exe ..\run\c&c.exe -f
	-del ..\run\temp.exe
#	-wstrip ..\run\install.exe
#	-move ..\run\install.exe ..\run\temp.exe
#	-watcom\4gwbind watcom\4gwpro.exe ..\run\temp.exe ..\run\install.exe -f
#	-del ..\run\temp.exe

#############################################################
# Update source and art to network.
update: bind .SYMBOLIC
	-del *.pch
	-del *.tr
	-del *.td
	-del *.bak
	-del *.rst
	-del ..\run\*.swp
	-attrib -r f:\projects\c&c\cd\*.* /s
	-copy ..\cd\*.* f:\projects\c&c\cd /v /u /s
	-deltree /Y f:\projects\c&c\cd\install
	-md f:\projects\c&c\cd\install
	-copy ..\run\*.* f:\projects\c&c\cd\install /v /u
	-del f:\projects\c&c\cd\install\*.cfg
	-del f:\projects\c&c\cd\install\*.dat
	-del f:\projects\c&c\cd\install\*.doc
	-del f:\projects\c&c\cd\install\*.ini
	-del f:\projects\c&c\cd\install\*.bin
	-del f:\projects\c&c\cd\install\*.lbm
	-del f:\projects\c&c\cd\install\*.out
	-del f:\projects\c&c\cd\install\*.sym
	-del f:\projects\c&c\cd\install\*.log
	-del f:\projects\c&c\cd\install\*.txt
	-del f:\projects\c&c\cd\install\*.bak
	-del f:\projects\c&c\cd\install\*.rst
	-del f:\projects\c&c\cd\install\savegame.*
	-move f:\projects\c&c\cd\install\conquer.exe f:\projects\c&c\playtest
	-attrib +r f:\projects\c&c\cd\*.* /s
	-copy watcom\dos4gw.exe f:\projects\c&c\playtest
	-deltree /Y f:\projects\c&c\art\ingame
	-md f:\projects\c&c\art\ingame
	-xcopy ..\art\ingame\*.* f:\projects\c&c\art\ingame /e /v /s
	-del /Y f:\projects\c&c\code\*.*
	-copy *.* f:\projects\c&c\code /v /s /u


#############################################################################
# Explicit rules to build the master zip files (used by Codewrite merge).
BILL_R.ZIP: pkzip.dat .SYMBOLIC
	-del f:\projects\c&c\bill_r.zip
	-pkzip -p -u -x@pkzip.dat f:\projects\c&c\bill_r.zip *.* eng\*.*

MARIA_L.ZIP: pkzip.dat .SYMBOLIC
	-del f:\projects\c&c\maria_l.zip
	-pkzip -p -u -x@pkzip.dat f:\projects\c&c\maria_l.zip *.* eng\*.*

BARRY_G.ZIP: pkzip.dat .SYMBOLIC
	-del f:\projects\c&c\barry_g.zip
	-pkzip -p -u -x@pkzip.dat f:\projects\c&c\barry_g.zip *.* eng\*.*

PHIL_G.ZIP: pkzip.dat .SYMBOLIC
	-del f:\projects\c&c\phil_g.zip
	-pkzip -p -u -x@pkzip.dat f:\projects\c&c\phil_g.zip *.* eng\*.*

DAVID_D.ZIP: pkzip.dat .SYMBOLIC
	-del f:\projects\c&c\david_d.zip
	-pkzip -p -u -x@pkzip.dat f:\projects\c&c\david_d.zip *.* eng\*.*

BILL_P.ZIP: pkzip.dat .SYMBOLIC
	-del f:\projects\c&c\bill_p.zip
	-pkzip -p -u -x@pkzip.dat f:\projects\c&c\bill_p.zip *.* eng\*.*

# Special "mega-zip" process.
JOE_B.ZIP: pkzip.dat .SYMBOLIC
	-pkzip -rp -u -xcps\*.* -x@pkzip.dat f:\projects\c&c\joe_b.zip


#############################################################################
# Rebuilds the master zip control file. This is used by the zip process.
PKZIP.DAT: makefile .SYMBOLIC
	%create $^@
	%append $^@ *.000
	%append $^@ *.@@@
	%append $^@ *.bak
	%append $^@ *.bat
	%append $^@ *.cfg
	%append $^@ *.dat
	%append $^@ *.def
	%append $^@ *.doc
	%append $^@ *.dsw
	%append $^@ *.err
	%append $^@ *.ewp
	%append $^@ *.ext
	%append $^@ *.i
	%append $^@ *.ide
	%append $^@ *.lnk
	%append $^@ *.log
	%append $^@ *.lst
	%append $^@ *.mac
	%append $^@ *.map
	%append $^@ *.mk
	%append $^@ *.mk1
	%append $^@ *.obj
	%append $^@ *.out
	%append $^@ *.pch
	%append $^@ *.pfs
	%append $^@ *.pif
	%append $^@ *.pjt
	%append $^@ *.prf
	%append $^@ *.pro
	%append $^@ *.ptg
	%append $^@ *.rc
	%append $^@ *.rep
	%append $^@ *.rpt
	%append $^@ *.rst
	%append $^@ *.sym
	%append $^@ *.tag
	%append $^@ *.td
	%append $^@ *.td
	%append $^@ *.tgt
	%append $^@ *.tmp
	%append $^@ *.tr
	%append $^@ *.tr
	%append $^@ *.vec
	%append $^@ *.wpj
	%append $^@ *.zip
	%append $^@ state.rst


#---------------------------------------------------------------------------
# Dependency macros (makes defining dependencies easier)
#---------------------------------------------------------------------------
GENERAL_H =		defines.h function.h externs.h conquer.h vector.h heap.h &
			debug.h jshell.h compat.h

TECHNO_H =		facing.h techno.h mission.h stage.h cargo.h object.h abstract.h

UNIT_H =		unit.h tarcom.h turret.h drive.h foot.h radio.h $(TECHNO_H)

INFANTRY_H =	infantry.h foot.h radio.h $(TECHNO_H)

AIRCRAFT_H =	aircraft.h fly.h radio.h $(TECHNO_H)

BUILDING_H =	building.h radio.h $(TECHNO_H)

BULLET_H =		bullet.h fly.h fuse.h object.h abstract.h

OBJ_H =		$(UNIT_H) $(INFANTRY_H) $(AIRCRAFT_H) $(BUILDING_H) $(BULLET_H)

MAP_H =		base.h mapedit.h mouse.h scroll.h help.h tab.h power.h sidebar.h &
			radar.h display.h map.h gscreen.h cell.h

GADGET_H =		textbtn.h shapebtn.h slider.h gauge.h dial8.h edit.h &
			toggle.h list.h cheklist.h control.h gadget.h link.h

FILE_H =		ccfile.h cdfile.h mixfile.h rawfile.h wwfile.h link.h

TEAM_H =		team.h teamtype.h trigger.h

IPX_H =		ipx.h ipxaddr.h 

NET_H =		combuf.h connect.h connmgr.h ipx.h ipxaddr.h ipxconn.h ipxgconn.h &
				ipxmgr.h noseqcon.h nullconn.h nullmgr.h 

MISC_H =		ftimer.h logic.h score.h theme.h event.h queue.h special.h

#---------------------------------------------------------------------------
# Dependencies (This is not totally accurate; if you're not sure, rebuild
# everything!)
#---------------------------------------------------------------------------
aadata.obj:		aadata.cpp $(GENERAL_H) type.h

abstract.obj:	abstract.cpp $(GENERAL_H) abstract.h

adata.obj:		adata.cpp $(GENERAL_H) type.h

aircraft.obj:	aircraft.cpp $(GENERAL_H) $(AIRCRAFT_H)

anim.obj:		anim.cpp $(GENERAL_H) anim.h stage.h object.h

audio.obj:		audio.cpp $(GENERAL_H) audio.h

base.obj:		base.cpp $(GENERAL_H) type.h

bbdata.obj:		bbdata.cpp $(GENERAL_H) type.h

bdata.obj:		bdata.cpp $(GENERAL_H) type.h

building.obj:	building.cpp $(GENERAL_H) $(BUILDING_H)

bullet.obj:		bullet.cpp $(GENERAL_H) $(BULLET_H)

cargo.obj:		cargo.cpp $(GENERAL_H) $(TECHNO_H) cargo.h

ccfile.obj:		ccfile.cpp $(GENERAL_H) $(FILE_H)

cdata.obj:		cdata.cpp $(GENERAL_H) type.h

cdfile.obj:		cdfile.cpp $(GENERAL_H) $(FILE_H)

cell.obj:		cell.cpp $(GENERAL_H) $(MAP_H)

cheklist.obj:	cheklist.cpp $(GENERAL_H) $(GADGET_H)

colrlist.obj:	colrlist.cpp $(GENERAL_H) $(GADGET_H)

combat.obj:		combat.cpp $(GENERAL_H)

combuf.obj:		combuf.cpp $(GENERAL_H) combuf.h

confdlg.obj:	confdlg.cpp $(GENERAL_H) $(GADGET_H)

connect.obj:	connect.cpp $(GENERAL_H) connect.h combuf.h

conquer.obj:	conquer.cpp $(GENERAL_H) $(MISC_H) $(OBJ_H)

const.obj:		const.cpp $(GENERAL_H)

control.obj:	control.cpp $(GENERAL_H) $(GADGET_H)

coord.obj:		coord.cpp $(GENERAL_H)

coorda.obj:		coorda.asm

credits.obj:	credits.cpp $(GENERAL_H) credits.h

crew.obj:		crew.cpp $(GENERAL_H) crew.h

debug.obj:		debug.cpp $(GENERAL_H) debug.h

deldlg.obj:		deldlg.cpp $(GENERAL_H) $(GADGET_H)

descdlg.obj:	descdlg.cpp $(GENERAL_H) $(GADGET_H)

dial8.obj:		dial8.cpp $(GENERAL_H) $(GADGET_H)

dialog.obj:		dialog.cpp $(GENERAL_H)

display.obj:	display.cpp $(GENERAL_H) $(MAP_H)

dpmi.obj:		dpmi.cpp $(GENERAL_H)

drive.obj:		drive.cpp $(GENERAL_H) $(TECHNO_H)

edit.obj:		edit.cpp $(GENERAL_H) $(GADGET_H)

event.obj:		event.cpp $(GENERAL_H) $(MISC_H)

facing.obj:		facing.cpp $(GENERAL_H) facing.h

factory.obj:	factory.cpp $(GENERAL_H) factory.h

findpath.obj:	findpath.cpp $(GENERAL_H)

flasher.obj:	flasher.cpp $(GENERAL_H) flasher.h

fly.obj:			fly.cpp $(GENERAL_H) fly.h

foot.obj:		foot.cpp $(GENERAL_H) $(INFANTRY_H)

fuse.obj:		fuse.cpp $(GENERAL_H) fuse.h

gadget.obj:		gadget.cpp $(GENERAL_H) $(GADGET_H)

gamedlg.obj:	gamedlg.cpp $(GENERAL_H) $(GADGET_H)

gauge.obj:		gauge.cpp $(GENERAL_H) $(GADGET_H)

globals.obj:	globals.cpp $(GENERAL_H)

goptions.obj:	goptions.cpp $(GENERAL_H) $(GADGET_H)

gscreen.obj:	gscreen.cpp $(GENERAL_H) $(MAP_H)

hdata.obj:		hdata.cpp $(GENERAL_H) type.h

heap.obj:		heap.cpp $(GENERAL_H) $(MISC_H)

help.obj:		help.cpp $(GENERAL_H) $(MAP_H)

house.obj:		house.cpp $(GENERAL_H) house.h

idata.obj:		idata.cpp $(GENERAL_H) type.h

infantry.obj:	infantry.cpp $(GENERAL_H) $(INFANTRY_H)

ini.obj:			ini.cpp $(GENERAL_H) $(MISC_H)

init.obj:		init.cpp $(GENERAL_H) $(MISC_H) $(OBJ_H)

iomap.obj:		iomap.cpp $(GENERAL_H) $(MAP_H) $(FILE_H)

ioobj.obj:		ioobj.cpp $(GENERAL_H) $(FILE_H) $(OBJ_H)

ipx.obj:			ipx.cpp $(GENERAL_H) $(IPX_H)

ipxaddr.obj:	ipxaddr.cpp $(GENERAL_H) $(IPX_H)

ipxconn.obj:	ipxconn.cpp $(GENERAL_H) $(NET_H)

ipxgconn.obj:	ipxgconn.cpp $(GENERAL_H) $(NET_H)

ipxmgr.obj:		ipxmgr.cpp $(GENERAL_H) $(NET_H)

ipxreal.ibn:

jshell.obj:		jshell.cpp $(GENERAL_H) $(MISC_H)

keyfbuff.obj:	keyfbuff.asm

keyframe.obj:		keyframe.cpp $(GENERAL_H)

layer.obj:		layer.cpp $(GENERAL_H) $(MISC_H)

link.obj:		link.cpp $(GENERAL_H) link.h

list.obj:		list.cpp $(GENERAL_H) $(GADGET_H)

loaddlg.obj:	loaddlg.cpp $(GENERAL_H) $(GADGET_H)

logic.obj:		logic.cpp $(GENERAL_H) $(MISC_H)

map.obj:			map.cpp $(GENERAL_H) $(MAP_H)

mapsel.obj:		mapsel.cpp $(GENERAL_H)

mapeddlg.obj:	mapeddlg.cpp $(GENERAL_H) $(MAP_H) $(OBJ_H)

mapedit.obj:	mapedit.cpp $(GENERAL_H) $(MAP_H) $(OBJ_H)

mapedplc.obj:	mapedplc.cpp $(GENERAL_H) $(MAP_H) $(OBJ_H)

mapedsel.obj:	mapedsel.cpp $(GENERAL_H) $(MAP_H) $(OBJ_H)

mapedtm.obj:	mapedtm.cpp $(GENERAL_H) $(MAP_H) $(OBJ_H)

menus.obj:		menus.cpp $(GENERAL_H)

mission.obj:	mission.cpp $(GENERAL_H) mission.h stage.h cargo.h object.h abstract.h

mixfile.obj:	mixfile.cpp $(GENERAL_H) $(FILE_H)

monoc.obj:		monoc.cpp $(GENERAL_H)

mouse.obj:		mouse.cpp $(GENERAL_H) $(MAP_H)

mplayer.obj:	mplayer.cpp $(GENERAL_H)

msgbox.obj:		msgbox.cpp $(GENERAL_H) $(GADGET_H)

msglist.obj:	msglist.cpp $(GENERAL_H) $(GADGET_H)

netdlg.obj:		netdlg.cpp $(GENERAL_H) $(GADGET_H) $(NET_H)

noseqcon.obj:	noseqcon.cpp $(GENERAL_H) noseqcon.h connect.h combuf.h

nullconn.obj:	nullconn.cpp $(GENERAL_H) nullconn.h noseqcon.h connect.h combuf.h

nulldlg.obj:	nulldlg.cpp $(GENERAL_H) nullmgr.h nullconn.h connmgr.h noseqcon.h connect.h combuf.h

nullmgr.obj:	nullmgr.cpp $(GENERAL_H) nullmgr.h nullconn.h connmgr.h noseqcon.h connect.h combuf.h

object.obj:		object.cpp $(GENERAL_H) object.h abstract.h

odata.obj:		odata.cpp $(GENERAL_H) type.h

options.obj:	options.cpp $(GENERAL_H) $(GADGET_H)

overlay.obj:	overlay.cpp $(GENERAL_H) overlay.h object.h

power.obj:		power.cpp $(GENERAL_H) $(MAP_H)

profile.obj:	profile.cpp $(GENERAL_H)

queue.obj:		queue.cpp $(GENERAL_H) $(MISC_H)

rand.obj:		rand.cpp $(GENERAL_H)

radar.obj:		radar.cpp $(GENERAL_H) $(MAP_H)

radio.obj:		radio.cpp $(GENERAL_H) $(TECHNO_H)

rawfile.obj:	rawfile.cpp $(GENERAL_H) $(FILE_H)

reinf.obj:		reinf.cpp $(GENERAL_H) $(MISC_H)

savedlg.obj:	savedlg.cpp $(GENERAL_H) $(GADGET_H)

saveload.obj:	saveload.cpp $(GENERAL_H) $(MISC_H)

scenario.obj:	scenario.cpp $(GENERAL_H) $(MISC_H)

score.obj:		score.cpp $(GENERAL_H)

scroll.obj:		scroll.cpp $(GENERAL_H) $(MAP_H)

sdata.obj:		sdata.cpp $(GENERAL_H) type.h

shapebtn.obj:	shapebtn.cpp $(GENERAL_H) $(GADGET_H)

sidebar.obj:	sidebar.cpp $(GENERAL_H) $(MAP_H)

slider.obj:		slider.cpp $(GENERAL_H) $(GADGET_H)

smudge.obj:		smudge.cpp $(GENERAL_H) smudge.h object.h

sounddlg.obj:	sounddlg.cpp $(GENERAL_H) $(GADGET_H) sounddlg.h

startup.obj:	startup.cpp $(GENERAL_H)

stuff.obj:		stuff.cpp $(GENERAL_H) $(MISC_H)

support.obj:	support.asm

tab.obj:			tab.cpp $(GENERAL_H) $(MAP_H)

tarcom.obj:		tarcom.cpp $(GENERAL_H) $(UNIT_H)

target.obj:		target.cpp $(GENERAL_H) target.h

tdata.obj:		tdata.cpp $(GENERAL_H) type.h

team.obj:		team.cpp $(GENERAL_H) $(TEAM_H)

teamtype.obj:	teamtype.cpp $(GENERAL_H) $(TEAM_H)

techno.obj:		techno.cpp $(GENERAL_H) $(TECHNO_H)

template.obj:	template.cpp $(GENERAL_H) template.h object.h

terrain.obj:	terrain.cpp $(GENERAL_H) terrain.h stage.h object.h

textbtn.obj:	textbtn.cpp $(GENERAL_H) $(GADGET_H)

theme.obj:		theme.cpp $(GENERAL_H) theme.h

toggle.obj:		toggle.cpp $(GENERAL_H) $(GADGET_H)

trigger.obj:	trigger.cpp $(GENERAL_H) $(TEAM_H)

turret.obj:		turret.cpp $(GENERAL_H) $(UNIT_H)

txtlabel.obj:	txtlabel.cpp $(GENERAL_H) $(GADGET_H)

txtprnt.obj:	txtprnt.asm

udata.obj:		udata.cpp $(GENERAL_H) type.h

unit.obj:		unit.cpp $(GENERAL_H) $(UNIT_H)

vector.obj:		vector.cpp $(GENERAL_H) $(MISC_H)

visudlg.obj:	visudlg.cpp $(GENERAL_H) $(GADGET_H)

#--------------------------------------------------------------------------
# The IPX assembly object files are created in a special way:
# IPXREAL is the real-mode code that gets stuffed into memory by protected-
# mode code.  It's assembled, then converted into a big header file by
# the 'EBN' utility.
# IPXPROT is the protected-mode code that includes IPXREAL.IBN, and 
# provides routines to let C++ read the code's address & size.
#--------------------------------------------------------------------------
#obj\ipxreal.ibn: obj\ipxreal.obj
#	%create $^*.rsp
#	%append $^*.rsp obj\$^&.obj
#	%append $^*.rsp obj\$^&.exe
#	%append $^*.rsp obj\$^&.map
#	tlink @$^*.rsp
#   tdstrip obj\ipxreal.exe
#   utils\ebn obj\ipxreal.exe

r:\ipxreal.ibn: r:\ipxreal.obj
	%create $^*.rsp
	%append $^*.rsp r:\$^&.obj
	%append $^*.rsp r:\$^&.exe
	%append $^*.rsp r:\$^&.map
	tlink @$^*.rsp
   tdstrip r:\ipxreal.exe
   utils\ebn r:\ipxreal.exe

ipxreal.obj:	ipxreal.asm
	tasm /zn /la /ml /m2 ipxreal.asm, r:\ipxreal.obj
#	tasm /zn /la /ml /m2 ipxreal.asm, obj\ipxreal.obj

#ipxprot.obj: obj\ipxreal.ibn ipxprot.asm
ipxprot.obj: r:\ipxreal.ibn ipxprot.asm

#**************************** End of makefile ******************************
