home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Learn 3D Graphics Programming on the PC
/
Learn_3D_Graphics_Programming_on_the_PC_Ferraro.iso
/
rwwin
/
makefile.2_
/
makefile.bin
Wrap
Makefile
|
1995-11-14
|
4KB
|
154 lines
##########################################################################
#
# File: Makefile
#
# Abstract : Makefile for Building a RenderWare application with
# the Watcom C compiler version 9.5 or 10.0
#
##########################################################################
#
# This file is a product of Criterion Software Ltd.
#
# This file is provided as is with no warranties of any kind and is
# provided without any obligation on Criterion Software Ltd. or
# Canon Inc. to assist in its use or modification.
#
# Criterion Software Ltd. will not, under any
# circumstances, be liable for any lost revenue or other damages arising
# from the use of this file.
#
# Copyright (c) 1995 Criterion Software Ltd.
# All Rights Reserved.
#
# RenderWare is a trademark of Canon Inc.
#
###########################################################################
# Build flags
CDEBUG = 0 # 1 = enable C debugging information
# 0 = disable C debugging information
RWDEBUG = 0 # 1 = Link with debugging RenderWare library
# 0 = Link with production RenderWare library
RWFIXED = 1 # 1 = Link with fixed point RenderWare library
# 0 = Link with floating point RenderWare library
RWDLL = 0 # 1 = Link with DLL binding libraries
# 0 = Link with static linked libraries
# Define the location of the RenderWare library and include files
RWDIR = \rwwin
RWINCDIR = $(RWDIR)\include
RWLIBDIR = $(RWDIR)\lib
# Define the location of the shared sources
COMMONDIR = ..\..\common
# Determine the build flags based on the options selected above
!ifeq CDEBUG 1
CDB_CFLAGS = -d2
CDB_LFLAGS = debug all
!else
CDB_CFLAGS = -oneatx
CDB_LFLAGS =
!endif
!ifeq RWFIXED 1
FX_CFLAGS = -DRWFIXED -fpc
!else
FX_CFLAGS = -DRWFLOAT -7
!endif
# Determine which library to link against based on the options above
!ifeq RWFIXED 1
!ifeq RWDLL 1
RWLIB = $(RWLIBDIR)\rwrxw.lib
!else # RWDLL
!ifeq RWDEBUG 1
RWLIB = $(RWLIBDIR)\rwwrxd.lib
!else # RWDEBUG
RWLIB = $(RWLIBDIR)\rwwrxp.lib
!endif # RWDEBUG
!endif # RWDLL
!else # RWFIXED
!ifeq RWDLL 1
RWLIB = $(RWLIBDIR)\rwrlw.lib
!else # RWDLL
!ifeq RWDEBUG 1
RWLIB = $(RWLIBDIR)\rwwrld.lib
!else # RWDEBUG
RWLIB = $(RWLIBDIR)\rwwrlp.lib
!endif # RWDEBUG
!endif # RWDLL
!endif # RWFIXED
# C Compiler options
CC = *wcc386p
CFLAGS = $(FX_CFLAGS) $(DB_CFLAGS) $(CDB_CFLAGS) -I$(RWINCDIR) -I$(COMMONDIR) -zw -w4 -j -zq -ei -s -5r
COUT = -fo
# Linker options
LINK = wlink
CLFLAGS = system win386 op q op st=32768 $(CDB_LFLAGS)
BIND = wbind
# Rules
.c.obj:
$(CC) $(CFLAGS) $(COUT)$*.obj $?
.c: $(COMMONDIR)
.c.obj:
$(CC) $(CFLAGS) $(COUT)$*.obj $?
# Define the name for the executable
BASENAME = rwsim
# Define the object files that make up this program
OBJLIB = rwsim.obj $(COMMONDIR)\common.obj $(COMMONDIR)\status.obj $(RWLIB)
all: $(BASENAME).rex $(BASENAME).exe .SYMBOLIC
# Bind the resources to the executable
$(BASENAME).exe: $(OBJLIB) $(BASENAME).rc
$(BIND) $(BASENAME).rex -R -i=$(COMMONDIR) $(BASENAME).rc
# Build the executable. We use an intermediate link file to simplify this
# procedure and to allow arbitrary length link lines
$(BASENAME).rex: $(BASENAME).lnk $(OBJLIB)
$(LINK) @$*
del $(BASENAME).lnk
$(BASENAME).lnk:
@%create $^@
@%append $^@ $(CLFLAGS)
@%append $^@ NAME $^&
@for %i in ($(OBJLIB)) do @%append $^@ FILE %i
# Clean the source up ready for distribution
dist-clean: .SYMBOLIC
%make clean
del $(BASENAME).exe
# Clean up any intermediate build files leaving the executable
clean: .SYMBOLIC
del $(BASENAME).lnk
del $(BASENAME).rex
del *.res
del *.err
del *.obj
del $(COMMONDIR)\*.obj