mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-05 20:41:06 +00:00
a9c8d071a6
git-svn-id: https://svn.eduke32.com/eduke32@1490 1a8010ca-5511-0410-912e-c29ae57300e0
173 lines
4.4 KiB
Text
173 lines
4.4 KiB
Text
# EDuke32 Makefile for Microsoft NMake
|
|
|
|
SRC=source
|
|
OBJ=obj_win
|
|
EROOT=build
|
|
EINC=$(EROOT)\include
|
|
EOBJ=eobj_win
|
|
INC=$(SRC)
|
|
RSRC=rsrc
|
|
o=obj
|
|
|
|
JAUDIOLIBDIR=$(SRC)\jaudiolib
|
|
JAUDIOLIB=libjfaudiolib.lib
|
|
|
|
ENGINELIB=engine.lib
|
|
EDITORLIB=build.lib
|
|
|
|
!ifdef DEBUG
|
|
# debugging options
|
|
flags_cl= /Od /Zi
|
|
flags_link=/DEBUG
|
|
!else
|
|
# release options
|
|
flags_cl=/Ox /GL /arch:SSE
|
|
flags_link=/RELEASE /LTCG
|
|
!endif
|
|
|
|
|
|
DXROOT="U:\SDKs\Microsoft DirectX SDK (April 2007)
|
|
MSSDKROOT="N:\Program Files\Microsoft Visual Studio 9.0\VC
|
|
PLATFORMSDK="N:\Program Files\Microsoft Visual Studio 9.0\VC\PlatformSDK
|
|
|
|
ENGINEOPTS=/DSUPERBUILD /DPOLYMOST /DUSE_OPENGL /DRANCID_NETWORKING /DPOLYMER
|
|
|
|
CC=cl
|
|
AS=ml
|
|
LINK=link /nologo /opt:ref
|
|
MT=mt
|
|
CFLAGS= /MT /J /nologo $(flags_cl) \
|
|
/I$(INC) /I$(EINC)\msvc /I$(EINC)\ /I$(SRC)\jmact /I$(JAUDIOLIBDIR)\include /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include" \
|
|
/D "_CRT_SECURE_NO_DEPRECATE" /W2 $(ENGINEOPTS) \
|
|
/I$(DXROOT)\include" /DRENDERTYPEWIN=1
|
|
LIBS=user32.lib gdi32.lib shell32.lib dxguid.lib winmm.lib wsock32.lib comctl32.lib \
|
|
/NODEFAULTLIB:glu32.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib
|
|
|
|
LIBS=vorbisfile_static.lib vorbis_static.lib ogg_static.lib dsound.lib $(LIBS)
|
|
|
|
ASFLAGS=/nologo /coff /c
|
|
EXESUFFIX=.exe
|
|
!ifdef DEBUG
|
|
CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS
|
|
LIBS=$(LIBS) /NODEFAULTLIB:libcmt.lib libcmtd.lib
|
|
!else
|
|
LIBS=$(LIBS) /NODEFAULTLIB:libcmtd.lib libcmt.lib
|
|
!endif
|
|
|
|
JMACTOBJ=$(OBJ)\util_lib.$o \
|
|
$(OBJ)\file_lib.$o \
|
|
$(OBJ)\control.$o \
|
|
$(OBJ)\keyboard.$o \
|
|
$(OBJ)\mouse.$o \
|
|
$(OBJ)\mathutil.$o \
|
|
$(OBJ)\scriplib.$o
|
|
|
|
AUDIOLIBOBJ=$(OBJ)\midi.$o $(OBJ)\music.$o $(OBJ)\mpu401.$o
|
|
|
|
GAMEOBJS=$(OBJ)\game.$o \
|
|
$(OBJ)\actors.$o \
|
|
$(OBJ)\anim.$o \
|
|
$(OBJ)\gamedef.$o \
|
|
$(OBJ)\gameexec.$o \
|
|
$(OBJ)\gamevars.$o \
|
|
$(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)\osdfuncs.$o \
|
|
$(OBJ)\osdcmds.$o \
|
|
$(OBJ)\grpscan.$o \
|
|
$(OBJ)\winbits.$o \
|
|
$(OBJ)\gameres.res \
|
|
$(OBJ)\startwin.game.$o \
|
|
$(JMACTOBJ) \
|
|
$(AUDIOLIBOBJ) \
|
|
$(OBJ)\sounds.$o \
|
|
!ifdef DEBUG
|
|
$(OBJ)\mdump.$o
|
|
!endif
|
|
|
|
EDITOROBJS=$(OBJ)\astub.$o \
|
|
$(OBJ)\mathutil.$o \
|
|
$(OBJ)\sounds_mapster32.$o \
|
|
$(OBJ)\buildres.res \
|
|
$(AUDIOLIB_FX) \
|
|
!ifdef DEBUG
|
|
$(OBJ)\mdump.$o
|
|
!endif
|
|
|
|
|
|
# RULES
|
|
.SUFFIXES: .masm
|
|
|
|
{$(SRC)\}.masm{$(OBJ)\}.$o:
|
|
$(AS) /c $(ASFLAGS) /Fo$@ $<
|
|
|
|
{$(SRC)\jmact}.c{$(OBJ)\}.$o:
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
{$(SRC)\util}.c{$(OBJ)\}.$o:
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
{$(SRC)\}.c{$(OBJ)\}.$o:
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
{$(SRC)\}.cpp{$(OBJ)\}.$o:
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
{$(SRC)\misc}.rc{$(OBJ)\}.res:
|
|
$(RC) /i$(EINC)\ /i$(SRC)\ /I$(MSSDKROOT)\include" /I$(PLATFORMSDK)\include" /DPOLYMER /fo$@ /r $<
|
|
|
|
|
|
# TARGETS
|
|
all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) # duke3d_w32$(EXESUFFIX);
|
|
|
|
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)\$(ENGINELIB) $(JAUDIOLIBDIR)\$(JAUDIOLIB)
|
|
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
|
|
$(MT) -manifest $(RSRC)\manifest.game.xml -hashupdate -outputresource:$@ -out:$@.manifest
|
|
|
|
mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)\$(ENGINELIB) $(EOBJ)\$(EDITORLIB) $(JAUDIOLIBDIR)\$(JAUDIOLIB)
|
|
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
|
|
$(MT) -manifest $(RSRC)\manifest.build.xml -hashupdate -outputresource:$@ -out:$@.manifest
|
|
|
|
duke3d_w32$(EXESUFFIX): $(OBJ)/wrapper.$o
|
|
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS /LIBPATH:$(DXROOT)\lib\x86" /LIBPATH:$(PLATFORMSDK)\lib" /LIBPATH:$(MSSDKROOT)\lib" $(flags_link) /MAP $** $(LIBS)
|
|
$(MT) -manifest $@.manifest -outputresource:$@
|
|
|
|
!include Makefile.deps
|
|
|
|
enginelib editorlib: AlwaysBuild
|
|
-mkdir $(EOBJ)
|
|
echo OBJ=$(MAKEDIR)\$(EOBJ)\ > $(EOBJ)\overrides.mak
|
|
echo CFLAGS=$(ENGINEOPTS) >> $(EOBJ)\overrides.mak
|
|
cd $(EROOT)
|
|
nmake /f Makefile.msvc "OVERRIDES=$(MAKEDIR)\$(EOBJ)\overrides.mak" $@
|
|
cd $(MAKEDIR)
|
|
|
|
jaudiolib:
|
|
cd $(JAUDIOLIBDIR)
|
|
nmake /f Makefile.msvc
|
|
cd $(MAKEDIR)
|
|
|
|
|
|
AlwaysBuild: ;
|
|
$(EOBJ)\$(EDITORLIB): editorlib ;
|
|
$(EOBJ)\$(ENGINELIB): enginelib ;
|
|
$(JAUDIOLIBDIR)\$(JAUDIOLIB): jaudiolib ;
|
|
|
|
# PHONIES
|
|
clean:
|
|
-del /Q $(OBJ)\* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) duke3d_w32$(EXESUFFIX) \
|
|
*.pdb *.map *.manifest
|
|
cd $(JAUDIOLIBDIR)
|
|
nmake /f Makefile.msvc clean
|
|
cd $(MAKEDIR)
|
|
|
|
veryclean: clean
|
|
-del /Q $(EOBJ)\*
|