2006-12-21 12:53:11 +00:00
|
|
|
# EDuke32 Makefile for Microsoft NMake
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
SRC=source
|
2007-10-24 06:48:13 +00:00
|
|
|
OBJ=obj_win
|
2008-10-20 03:09:19 +00:00
|
|
|
EROOT=build
|
2006-08-31 01:54:23 +00:00
|
|
|
EINC=$(EROOT)\include
|
2007-10-24 06:48:13 +00:00
|
|
|
EOBJ=eobj_win
|
2006-04-13 20:47:06 +00:00
|
|
|
INC=$(SRC)
|
2007-09-11 02:23:08 +00:00
|
|
|
RSRC=rsrc
|
2006-04-13 20:47:06 +00:00
|
|
|
o=obj
|
|
|
|
|
|
|
|
ENGINELIB=engine.lib
|
|
|
|
EDITORLIB=build.lib
|
|
|
|
|
|
|
|
!ifdef DEBUG
|
|
|
|
# debugging options
|
2008-02-17 05:08:18 +00:00
|
|
|
flags_cl= /Ot /Zi
|
2006-04-13 20:47:06 +00:00
|
|
|
flags_link=/DEBUG
|
|
|
|
!else
|
|
|
|
# release options
|
2008-02-17 05:08:18 +00:00
|
|
|
flags_cl=/O2 /Ox #/Ob1gity
|
2006-04-13 20:47:06 +00:00
|
|
|
flags_link=/RELEASE
|
|
|
|
!endif
|
|
|
|
|
|
|
|
|
2009-04-12 21:52:49 +00:00
|
|
|
DXROOT="U:\SDKs\Microsoft DirectX SDK (April 2007)
|
2009-03-23 05:17:20 +00:00
|
|
|
MSSDKROOT="N:\Program Files\Microsoft Visual Studio 9.0\VC
|
|
|
|
PLATFORMSDK="N:\Program Files\Microsoft Visual Studio 9.0\VC\PlatformSDK
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2008-11-26 08:14:23 +00:00
|
|
|
ENGINEOPTS=/DSUPERBUILD /DPOLYMOST /DUSE_OPENGL /DUSE_OPENAL /DRANCID_NETWORKING /DPOLYMER
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
CC=cl
|
|
|
|
AS=ml
|
|
|
|
LINK=link /opt:nowin98 /nologo /opt:ref
|
2007-09-11 00:52:38 +00:00
|
|
|
MT=mt
|
2008-02-17 05:08:18 +00:00
|
|
|
CFLAGS= /MD /J /nologo $(flags_cl) \
|
2007-10-24 06:48:13 +00:00
|
|
|
/I$(INC) /I$(EINC)\ /I$(SRC)\jmact /I$(SRC)\jaudiolib /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include" \
|
2008-11-05 11:49:13 +00:00
|
|
|
/DNOCOPYPROTECT /D "_CRT_SECURE_NO_DEPRECATE" -W2 $(ENGINEOPTS) \
|
2009-04-12 21:52:49 +00:00
|
|
|
/I$(DXROOT)\include" /DRENDERTYPEWIN=1
|
2006-07-02 17:33:49 +00:00
|
|
|
LIBS=user32.lib gdi32.lib shell32.lib dxguid.lib winmm.lib wsock32.lib comctl32.lib \
|
2008-03-09 08:14:12 +00:00
|
|
|
/NODEFAULTLIB:libFLAC.lib /NODEFAULTLIB:glu32.lib /NODEFAULTLIB:LIBCMT.lib /NODEFAULTLIB:LIBCMTD.lib
|
|
|
|
|
|
|
|
LIBS=vorbisfile_static.lib vorbis_static.lib ogg_static.lib $(LIBS)
|
|
|
|
|
2008-11-09 11:09:42 +00:00
|
|
|
ASFLAGS=/nologo /coff /c
|
2006-04-13 20:47:06 +00:00
|
|
|
EXESUFFIX=.exe
|
2008-12-28 23:27:24 +00:00
|
|
|
!ifdef DEBUG
|
|
|
|
CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS
|
|
|
|
!endif
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
JMACTOBJ=$(OBJ)\util_lib.$o \
|
|
|
|
$(OBJ)\file_lib.$o \
|
|
|
|
$(OBJ)\control.$o \
|
|
|
|
$(OBJ)\keyboard.$o \
|
|
|
|
$(OBJ)\mouse.$o \
|
|
|
|
$(OBJ)\mathutil.$o \
|
|
|
|
$(OBJ)\scriplib.$o
|
|
|
|
|
2007-01-14 07:00:29 +00:00
|
|
|
AUDIOLIB_FX_STUB=$(OBJ)\jaudiolib_fxstub.$o
|
|
|
|
AUDIOLIB_MUSIC_STUB=$(OBJ)\jaudiolib_musicstub.$o
|
2006-08-31 01:54:23 +00:00
|
|
|
#AUDIOLIB_FX=$(OBJ)\jaudiolib_fx_fmod.$o
|
|
|
|
AUDIOLIB_FX=$(OBJ)\mv_mix.$o \
|
|
|
|
$(OBJ)\mv_mix16.$o \
|
|
|
|
$(OBJ)\mvreverb.$o \
|
|
|
|
$(OBJ)\pitch.$o \
|
|
|
|
$(OBJ)\multivoc.$o \
|
2008-03-09 08:14:12 +00:00
|
|
|
$(OBJ)\openal.$o \
|
2006-08-31 01:54:23 +00:00
|
|
|
$(OBJ)\ll_man.$o \
|
|
|
|
$(OBJ)\fx_man.$o \
|
|
|
|
$(OBJ)\dsoundout.$o
|
|
|
|
AUDIOLIB_MUSIC=$(OBJ)\midi.$o \
|
|
|
|
$(OBJ)\mpu401.$o \
|
2008-03-09 08:14:12 +00:00
|
|
|
$(OBJ)\music.$o
|
|
|
|
|
2009-03-23 05:17:20 +00:00
|
|
|
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX)
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2006-12-21 12:53:11 +00:00
|
|
|
GAMEOBJS=$(OBJ)\game.$o \
|
2006-08-31 01:54:23 +00:00
|
|
|
$(OBJ)\actors.$o \
|
|
|
|
$(OBJ)\anim.$o \
|
|
|
|
$(OBJ)\gamedef.$o \
|
|
|
|
$(OBJ)\gameexec.$o \
|
2006-12-10 19:32:44 +00:00
|
|
|
$(OBJ)\gamevars.$o \
|
2006-08-31 01:54:23 +00:00
|
|
|
$(OBJ)\global.$o \
|
|
|
|
$(OBJ)\menus.$o \
|
|
|
|
$(OBJ)\namesdyn.$o \
|
|
|
|
$(OBJ)\player.$o \
|
|
|
|
$(OBJ)\premap.$o \
|
|
|
|
$(OBJ)\savegame.$o \
|
|
|
|
$(OBJ)\sector.$o \
|
|
|
|
$(OBJ)\rts.$o \
|
|
|
|
$(OBJ)\config.$o \
|
|
|
|
$(OBJ)\animlib.$o\
|
|
|
|
$(OBJ)\testcd.$o \
|
|
|
|
$(OBJ)\osdfuncs.$o \
|
|
|
|
$(OBJ)\osdcmds.$o \
|
|
|
|
$(OBJ)\grpscan.$o \
|
|
|
|
$(OBJ)\winbits.$o \
|
|
|
|
$(OBJ)\gameres.res \
|
|
|
|
$(OBJ)\startwin.game.$o \
|
2006-07-22 06:13:16 +00:00
|
|
|
$(JMACTOBJ) \
|
2007-09-11 02:23:08 +00:00
|
|
|
$(AUDIOLIBOBJ) \
|
2009-03-23 05:17:20 +00:00
|
|
|
$(OBJ)\sounds.$o \
|
2008-01-27 22:50:29 +00:00
|
|
|
!ifdef DEBUG
|
2007-09-11 02:23:08 +00:00
|
|
|
$(OBJ)\mdump.$o
|
2008-01-27 22:50:29 +00:00
|
|
|
!endif
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
EDITOROBJS=$(OBJ)\astub.$o \
|
2009-03-23 05:17:20 +00:00
|
|
|
$(OBJ)\mathutil.$o \
|
|
|
|
$(OBJ)\sounds_mapster32.$o \
|
2007-09-11 02:23:08 +00:00
|
|
|
$(OBJ)\buildres.res \
|
2009-03-23 05:17:20 +00:00
|
|
|
$(AUDIOLIB_FX) \
|
2008-01-27 22:50:29 +00:00
|
|
|
!ifdef DEBUG
|
2007-09-11 02:23:08 +00:00
|
|
|
$(OBJ)\mdump.$o
|
2008-01-27 22:50:29 +00:00
|
|
|
!endif
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
# RULES
|
|
|
|
.SUFFIXES: .masm
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
{$(SRC)\}.masm{$(OBJ)\}.$o:
|
2006-04-13 20:47:06 +00:00
|
|
|
$(AS) /c $(ASFLAGS) /Fo$@ $<
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
{$(SRC)\jaudiolib}.masm{$(OBJ)\}.$o:
|
2006-04-13 20:47:06 +00:00
|
|
|
$(AS) /c $(ASFLAGS) /Fo$@ $<
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
{$(SRC)\jmact}.c{$(OBJ)\}.$o:
|
2006-04-13 20:47:06 +00:00
|
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
{$(SRC)\jaudiolib}.c{$(OBJ)\}.$o:
|
2006-04-13 20:47:06 +00:00
|
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
{$(SRC)\util}.c{$(OBJ)\}.$o:
|
2006-04-13 20:47:06 +00:00
|
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
{$(SRC)\}.c{$(OBJ)\}.$o:
|
2006-04-13 20:47:06 +00:00
|
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
{$(SRC)\}.cpp{$(OBJ)\}.$o:
|
2006-04-13 20:47:06 +00:00
|
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
{$(SRC)\misc}.rc{$(OBJ)\}.res:
|
2006-12-21 12:53:11 +00:00
|
|
|
$(RC) /i$(EINC)\ /i$(SRC)\ /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include" /fo$@ /r $<
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
# TARGETS
|
2009-01-31 00:02:14 +00:00
|
|
|
all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) # duke3d_w32$(EXESUFFIX);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)\$(ENGINELIB)
|
2009-04-12 21:52:49 +00:00
|
|
|
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS) msvcrt.lib
|
2007-09-11 02:23:08 +00:00
|
|
|
$(MT) -manifest $@.manifest $(RSRC)\manifest.game.xml -hashupdate -outputresource:$@ -out:$@.manifest
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2006-08-31 01:54:23 +00:00
|
|
|
mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)\$(ENGINELIB) $(EOBJ)\$(EDITORLIB)
|
2009-04-12 21:52:49 +00:00
|
|
|
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS) msvcrt.lib
|
2007-09-11 02:23:08 +00:00
|
|
|
$(MT) -manifest $@.manifest $(RSRC)\manifest.build.xml -hashupdate -outputresource:$@ -out:$@.manifest
|
2008-03-09 08:14:12 +00:00
|
|
|
|
|
|
|
duke3d_w32$(EXESUFFIX): $(OBJ)/wrapper.$o
|
2009-04-12 21:52:49 +00:00
|
|
|
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS) msvcrt.lib
|
2007-09-11 00:52:38 +00:00
|
|
|
$(MT) -manifest $@.manifest -outputresource:$@
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
!include Makefile.deps
|
|
|
|
|
|
|
|
enginelib editorlib: AlwaysBuild
|
2006-12-21 12:53:11 +00:00
|
|
|
-mkdir $(EOBJ)
|
2006-08-31 01:54:23 +00:00
|
|
|
echo OBJ=$(MAKEDIR)\$(EOBJ)\ > $(EOBJ)\overrides.mak
|
|
|
|
echo CFLAGS=$(ENGINEOPTS) >> $(EOBJ)\overrides.mak
|
2006-12-21 12:53:11 +00:00
|
|
|
cd $(EROOT)
|
2006-08-31 01:54:23 +00:00
|
|
|
nmake /f Makefile.msvc "OVERRIDES=$(MAKEDIR)\$(EOBJ)\overrides.mak" $@
|
2006-04-13 20:47:06 +00:00
|
|
|
cd $(MAKEDIR)
|
|
|
|
|
|
|
|
AlwaysBuild: ;
|
2006-08-31 01:54:23 +00:00
|
|
|
$(EOBJ)\$(EDITORLIB): editorlib ;
|
|
|
|
$(EOBJ)\$(ENGINELIB): enginelib ;
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
# PHONIES
|
|
|
|
clean:
|
2008-03-09 08:14:12 +00:00
|
|
|
-del /Q $(OBJ)\* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) duke3d_w32$(EXESUFFIX) \
|
2006-12-21 12:53:11 +00:00
|
|
|
*.pdb *.map *.manifest
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
veryclean: clean
|
2006-12-21 12:53:11 +00:00
|
|
|
-del /Q $(EOBJ)\*
|