MSVC build system consolidation.

DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4553 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2014-07-23 07:21:29 +00:00
parent 1e7002b280
commit e79a2fe828
14 changed files with 203 additions and 464 deletions

View file

@ -13,6 +13,7 @@ ENGINE_SRC=$(ENGINE_ROOT)/src
ENGINE_INC=$(ENGINE_ROOT)/include
o=o
asm=nasm
obj=obj
# BUILD Engine
@ -20,11 +21,8 @@ asm=nasm
ENGINE_CFLAGS=-I$(ENGINE_SRC)
UTIL_LIBS= -lm # -lpthread
ifeq ($(PLATFORM),WINDOWS)
ENGINE_OBJ=$(DUKE3D_SRC)/eobj_win
else
ENGINE_OBJ=$(DUKE3D_SRC)/eobj
endif
ENGINE_OBJ=$(ENGINE_ROOT)/$(obj)
ENGINE_OBJS=baselayer cache1d compat crc32 defs engine polymost texcache dxtfilter hightile textfont smalltextfont kplib lz4 osd pragmas scriptfile mutex xxhash
ENGINE_EDITOR_OBJS=build config defs
@ -84,6 +82,7 @@ AUDIOLIB_OBJS=drivers fx_man multivoc mix mixst pitch formats vorbis flac xa dri
AUDIOLIB_ROOT=$(DUKE3D_SRC)/jaudiolib
AUDIOLIB_SRC=$(AUDIOLIB_ROOT)/src
AUDIOLIB_INC=$(AUDIOLIB_ROOT)/include
AUDIOLIB_OBJ=$(AUDIOLIB_ROOT)/$(obj)
AUDIOLIB_CFLAGS=-I$(AUDIOLIB_ROOT)/third-party/common/include -DHAVE_VORBIS
ifneq ($(PLATFORM),WII)
@ -95,10 +94,6 @@ ifeq ($(PLATFORM),WINDOWS)
AUDIOLIB_CFLAGS+= -DHAVE_DS
AUDIOLIB_OBJS+= driver_directsound
endif
AUDIOLIB_OBJ=$(AUDIOLIB_ROOT)/obj_win
else
AUDIOLIB_OBJ=$(AUDIOLIB_ROOT)/obj
endif
ifeq ($(MIXERTYPE),SDL)
@ -123,15 +118,15 @@ ENET_OBJS=callbacks host list packet peer protocol compress
ENET_ROOT=$(DUKE3D_SRC)/enet
ENET_SRC=$(ENET_ROOT)/src
ENET_INC=$(ENET_ROOT)/include
ENET_OBJ=$(ENET_ROOT)/$(obj)
ENET_CFLAGS=
ifeq ($(PLATFORM),WINDOWS)
ENET_OBJS += win32
ENET_OBJ=$(ENET_ROOT)/obj_win
else
ENET_OBJS += unix
ENET_CFLAGS += -DHAS_SOCKLEN_T
ENET_OBJ=$(ENET_ROOT)/obj
endif
ENET_OBJS_EXP:=$(addprefix $(ENET_OBJ)/,$(addsuffix .$o,$(ENET_OBJS)))
@ -169,6 +164,7 @@ COMPILERFLAGS += -I$(DUKE3D_INC) -I$(ENGINE_INC) -I$(DUKE3D_SRC)/jmact -I$(AUDIO
DUKE3D_LINKERFLAGS=
DUKE3D_EDITOR_LINKERFLAGS=
DUKE3D_OBJ=$(DUKE3D_SRC)/$(obj)
ifeq ($(NETCODE),0)
ENET_TARGET=
@ -190,13 +186,8 @@ ifndef EBACKTRACEDLL
endif
EBACKTRACEDLL_TARGET:=$(EBACKTRACEDLL)
ifeq ($(PLATFORM),WINDOWS)
DUKE3D_OBJ=$(DUKE3D_SRC)/obj_win
else
ifeq ($(SUBPLATFORM),LINUX)
LIBS+= -lrt
endif
DUKE3D_OBJ=$(DUKE3D_SRC)/obj
ifeq ($(SUBPLATFORM),LINUX)
LIBS+= -lrt
endif
MACT_OBJ=file_lib control keyboard mouse joystick mathutil scriplib animlib
@ -231,7 +222,7 @@ ifneq (0,$(LUNATIC))
ifneq ($(PLATFORM),WINDOWS)
# On non-Windows, we expect to have liblpeg.a (or a symlink to it) in source/.
# On Windows, it will reside in platform/Windows/lib/32/ or lib/64/.
LIBDIRS+= -L$(abspath $(DUKE3D_SRC))
LIBDIRS+= -L$(DUKE3D_SRC)
ifeq ($(realpath $(DUKE3D_SRC)/liblpeg.a),)
# XXX: This cripples "make clean" etc. too, but IMO it's better than warning.
$(error "liblpeg.a not found in $(realpath $(DUKE3D_OBJ)/..)")
@ -280,7 +271,7 @@ endif
ifeq ($(PLATFORM),DARWIN)
COMMONFLAGS += -fno-pic
LIBDIRS += -L$(abspath $(AUDIOLIB_ROOT)/third-party/Apple/lib)
LIBDIRS += -L$(AUDIOLIB_ROOT)/third-party/Apple/lib
LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lm \
-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,OpenGL \
@ -298,7 +289,7 @@ endif
ifeq ($(PLATFORM),WINDOWS)
COMMONFLAGS += -fno-pic
LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lcompat-from-mingw-w64
LIBDIRS += -L$(abspath $(AUDIOLIB_ROOT)/third-party/Windows/lib$(WINLIB))
LIBDIRS += -L$(AUDIOLIB_ROOT)/third-party/Windows/lib$(WINLIB)
DUKE3D_OBJS+= gameres winbits startwin.game
DUKE3D_EDITOR_OBJS+= buildres
ifeq ($(MIXERTYPE),WIN)
@ -424,7 +415,7 @@ arttool$(EXESUFFIX): $(ENGINE_OBJ)/arttool.$o
$(ONESTEP_STATUS)
$(RECIPE_IF) $(L_CXX) $(CPPONLYFLAGS) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB) $(UTIL_LIBS) $(RECIPE_RESULT_ONESTEP)
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.c
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.c | $(DUKE3D_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
@ -465,56 +456,56 @@ $(DUKE3D_SRC)/lunatic/mapster32.def: $(DUKE3D_SRC)/lunatic/dynsymlist_m32
####
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.nasm
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.nasm | $(ENGINE_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(AS) $(ASFLAGS) $< -o $@ $(RECIPE_RESULT_COMPILE)
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.yasm
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.yasm | $(ENGINE_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(AS) $(ASFLAGS) $< -o $@ $(RECIPE_RESULT_COMPILE)
# Comment out the following rule to debug a-c.o
$(ENGINE_OBJ)/a-c.$o: $(ENGINE_SRC)/a-c.c
$(ENGINE_OBJ)/a-c.$o: $(ENGINE_SRC)/a-c.c | $(ENGINE_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(COMPILER) $(subst -O$(OPTLEVEL),-O2,$(subst $(CLANG_DEBUG_FLAGS),,$(COMMONFLAGS) $(COMPILERFLAGS))) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.c
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.c | $(ENGINE_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/util/%.c
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/util/%.c | $(DUKE3D_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.m
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.m | $(ENGINE_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.cpp
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.cpp | $(ENGINE_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(CXX) $(CPPONLYFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/misc/%.c
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/misc/%.c | $(ENGINE_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/misc/%.rc
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/misc/%.rc | $(ENGINE_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(RC) -i $< -o $@ --include-dir=$(ENGINE_INC) --include-dir=$(ENGINE_SRC) $(RECIPE_RESULT_COMPILE)
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.c
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.c | $(ENGINE_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.cpp
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.cpp | $(ENGINE_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(CXX) $(CPPONLYFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.cc
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.cc | $(ENGINE_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(CXX) $(CPPONLYFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
$(ENGINE_OBJ)/%.$o: $(DUKE3D_RSRC)/%.c
$(ENGINE_OBJ)/%.$o: $(DUKE3D_RSRC)/%.c | $(ENGINE_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
@ -522,33 +513,27 @@ $(AUDIOLIB_OBJ)/%.o: $(AUDIOLIB_SRC)/%.c | $(AUDIOLIB_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(AUDIOLIB_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
$(AUDIOLIB_OBJ):
mkdir $(AUDIOLIB_OBJ)
$(ENET_OBJ)/%.o: $(ENET_SRC)/%.c $(ENET_INC)/enet/*.h | $(ENET_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENET_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
$(ENET_OBJ):
mkdir $(ENET_OBJ)
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.m
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.m | $(DUKE3D_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.cpp
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.cpp | $(DUKE3D_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(CXX) $(CPPONLYFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/jmact/%.c
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/jmact/%.c | $(DUKE3D_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/misc/%.rc
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/misc/%.rc | $(DUKE3D_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(RC) -i $< -o $@ --include-dir=$(ENGINE_INC) --include-dir=$(DUKE3D_SRC) -DPOLYMER=$(POLYMER) $(RECIPE_RESULT_COMPILE)
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_RSRC)/%.c
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_RSRC)/%.c | $(DUKE3D_OBJ)
$(COMPILE_STATUS)
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -Wno-pointer-sign -c $< -o $@ $(RECIPE_RESULT_COMPILE)
@ -561,6 +546,9 @@ $(DUKE3D_RSRC)/editor_banner.c: $(DUKE3D_RSRC)/build.bmp
echo "extern const GdkPixdata startbanner_pixdata;" >> $@
gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
$(ENGINE_OBJ) $(AUDIOLIB_OBJ) $(ENET_OBJ) $(DUKE3D_OBJ):
mkdir $@
# PHONIES
clean: $(UNDO_REV)

View file

@ -648,7 +648,7 @@ ifeq ($(PLATFORM),DARWIN)
ASFLAGS+= -DUNDERSCORES
# include port and brew
LIBDIRS+= -L$(abspath platform/Apple/lib) -L/opt/local/lib -L/usr/local/lib
LIBDIRS+= -Lplatform/Apple/lib -L/opt/local/lib -L/usr/local/lib
COMPILERFLAGS+= -Iplatform/Apple/include -I/opt/local/include -I/sw/include -I/usr/local/include
RENDERTYPE = SDL
@ -711,7 +711,7 @@ ifeq ($(PLATFORM),WINDOWS)
SDL_FRAMEWORK=1
EXESUFFIX=.exe
DLLSUFFIX=.dll
LIBDIRS+= -L$(abspath platform/Windows/lib$(WINLIB))
LIBDIRS+= -Lplatform/Windows/lib$(WINLIB)
LIBS+= -Wl,--enable-auto-import -lmingwex -lgdi32 -lcomctl32 -lwinmm $(L_SSP) -lwsock32 -lws2_32 -lshlwapi
ifeq (0,$(CLANG))
LIBS+= -mwindows
@ -766,7 +766,7 @@ ifeq ($(PLATFORM),WII)
SDLCONFIG=
SDL_TARGET=1
SDL_FRAMEWORK=1
LIBDIRS += -L$(LIBOGC_LIB) -L$(PORTLIBS)/lib -L$(abspath platform/Wii/lib)
LIBDIRS += -L$(LIBOGC_LIB) -L$(PORTLIBS)/lib -Lplatform/Wii/lib
endif
ifeq ($(PLATFORM),QNX)
RENDERTYPE=SDL

View file

@ -1,13 +1,35 @@
# EDuke32 Makefile for Microsoft NMake
CPLUSPLUS=1
DUKE3D_SRC=source
DUKE3D_OBJ=$(DUKE3D_SRC)\obj_win
obj=obj
ENGINE_ROOT=build
ENGINE_SRC=$(ENGINE_ROOT)\src
ENGINE_INC=$(ENGINE_ROOT)\include
ENGINE_OBJ=$(DUKE3D_SRC)\eobj_win
ENGINE_OBJ=$(ENGINE_ROOT)\$(obj)
DUKE3D_SRC=source
DUKE3D_OBJ=$(DUKE3D_SRC)\$(obj)
DUKE3D_INC=$(DUKE3D_SRC)
DUKE3D_RSRC=rsrc
AUDIOLIB_ROOT=$(DUKE3D_SRC)\jaudiolib
AUDIOLIB_OBJ=$(AUDIOLIB_ROOT)\$(obj)
AUDIOLIB_INC=$(AUDIOLIB_ROOT)\include
AUDIOLIB_SRC=$(AUDIOLIB_ROOT)\src
ENET_ROOT=$(DUKE3D_SRC)\enet
ENET_OBJ=$(ENET_ROOT)\$(obj)
ENET_INC=$(ENET_ROOT)\include
ENET_SRC=$(ENET_ROOT)\src
o=obj
res=res
asm=masm
CPLUSPLUS=1
!ifndef WINBITS
WINBITS=32
@ -21,15 +43,6 @@ WINMACHINE=/MACHINE:X86
WINMACHINE=/MACHINE:X64
!endif
AUDIOLIB_ROOT=$(DUKE3D_SRC)\jaudiolib
JAUDIOLIB=libjfaudiolib.lib
ENETDIR=$(DUKE3D_SRC)\enet
ENETLIB=libenet.lib
ENGINELIB=engine.lib
EDITORLIB=build.lib
# the WDK allows us to link against msvcrt.dll instead of msvcrxxx.dll
# this path should match build\Makefile.msvc
# WDKROOT="H:\WinDDK\7600.16385.1"
@ -57,7 +70,7 @@ flags_cl=$(flags_cl) /arch:SSE
flags_link=/RELEASE /LTCG # /LIBPATH:$(WDKROOT)\lib\wxp\i386 /LIBPATH:$(WDKROOT)\lib\Crt\i386
!endif
ENGINEOPTS=/DUSE_OPENGL /DPOLYMER /DUSE_LIBPNG /I..\$(PLATFORM)\include
ENGINEOPTS=/DUSE_OPENGL /DPOLYMER /DUSE_LIBPNG
!ifdef CPLUSPLUS
ENGINEOPTS=$(ENGINEOPTS) /TP
@ -72,13 +85,16 @@ AS=ml
LINK=link /nologo /opt:ref
MT=mt
CFLAGS= /MT /J /nologo $(flags_cl) \
/I$(DUKE3D_INC) /I$(ENGINE_INC)\msvc /I$(ENGINE_INC)\ /I$(DUKE3D_SRC)\jmact /I$(AUDIOLIB_ROOT)\include /I$(ENETDIR)\include \
/I$(DUKE3D_INC) /I$(ENGINE_INC)\msvc /I$(ENGINE_INC) /I$(DUKE3D_SRC)\jmact /I$(AUDIOLIB_ROOT)\include /I$(ENET_ROOT)\include \
/W2 $(ENGINEOPTS) \
/I$(PLATFORM)\include /I$(AUDIOINC)\include /DRENDERTYPE$(RENDERTYPE)=1 /DMIXERTYPE$(MIXERTYPE)=1 /DSDL_FRAMEWORK /DSDL_TARGET=2 /DUSE_LIBVPX
ENET_CFLAGS=/I$(ENET_INC) /I$(ENET_SRC)
AUDIOLIB_CFLAGS=/I$(AUDIOLIB_INC) /I$(AUDIOLIB_INC)\msvc /I$(AUDIOLIB_SRC) /DHAVE_VORBIS /DHAVE_FLAC
LIBS=user32.lib gdi32.lib shell32.lib winmm.lib ws2_32.lib comctl32.lib shlwapi.lib oleaut32.lib ole32.lib imm32.lib version.lib \
libFLAC.a libogg.a libvorbis.a libvorbisfile.a libvpx.a libpng_mini.a libz_mini.a libcompat-from-mingw-w64.a \
dsound.lib advapi32.lib libcompat-to-msvc.a
dxguid.lib dsound.lib advapi32.lib libcompat-to-msvc.a
!if ("$(RENDERTYPE)"=="SDL")
LIBS=libSDL2main.a libSDL2.a libSDL2_mixer.a $(LIBS)
@ -102,7 +118,63 @@ LIBS=$(LIBS) msvcrtd.lib
LIBS=$(LIBS) msvcrt.lib # msvcrt_winxp.obj
!endif
JMACTOBJ=$(DUKE3D_OBJ)\file_lib.$o \
ENGINE_OBJS= \
!ifdef NOASM
$(ENGINE_OBJ)\a-c.$o \
!else
$(ENGINE_OBJ)\a.$o \
!endif
$(ENGINE_OBJ)\baselayer.$o \
$(ENGINE_OBJ)\cache1d.$o \
$(ENGINE_OBJ)\compat.$o \
$(ENGINE_OBJ)\crc32.$o \
$(ENGINE_OBJ)\defs.$o \
$(ENGINE_OBJ)\engine.$o \
$(ENGINE_OBJ)\polymost.$o \
$(ENGINE_OBJ)\texcache.$o \
$(ENGINE_OBJ)\dxtfilter.$o \
$(ENGINE_OBJ)\hightile.$o \
$(ENGINE_OBJ)\mdsprite.$o \
$(ENGINE_OBJ)\textfont.$o \
$(ENGINE_OBJ)\smalltextfont.$o \
$(ENGINE_OBJ)\glbuild.$o \
$(ENGINE_OBJ)\kplib.$o \
$(ENGINE_OBJ)\lz4.$o \
$(ENGINE_OBJ)\lzwnew.$o \
$(ENGINE_OBJ)\osd.$o \
$(ENGINE_OBJ)\pragmas.$o \
$(ENGINE_OBJ)\scriptfile.$o \
$(ENGINE_OBJ)\polymer.$o \
$(ENGINE_OBJ)\mutex.$o \
$(ENGINE_OBJ)\winbits.$o \
$(ENGINE_OBJ)\xxhash.$o
ENGINE_EDITOR_OBJS=$(ENGINE_OBJ)\build.$o \
$(ENGINE_OBJ)\startwin.editor.$o \
$(ENGINE_OBJ)\config.$o
ENET_OBJS=$(ENET_OBJ)\callbacks.$o \
$(ENET_OBJ)\host.$o \
$(ENET_OBJ)\list.$o \
$(ENET_OBJ)\packet.$o \
$(ENET_OBJ)\peer.$o \
$(ENET_OBJ)\protocol.$o \
$(ENET_OBJ)\win32.$o \
$(ENET_OBJ)\compress.$o
AUDIOLIB_OBJS=$(AUDIOLIB_OBJ)\drivers.$o \
$(AUDIOLIB_OBJ)\fx_man.$o \
$(AUDIOLIB_OBJ)\multivoc.$o \
$(AUDIOLIB_OBJ)\mix.$o \
$(AUDIOLIB_OBJ)\mixst.$o \
$(AUDIOLIB_OBJ)\pitch.$o \
$(AUDIOLIB_OBJ)\formats.$o \
$(AUDIOLIB_OBJ)\vorbis.$o \
$(AUDIOLIB_OBJ)\flac.$o \
$(AUDIOLIB_OBJ)\xa.$o \
$(AUDIOLIB_OBJ)\driver_nosound.$o
MACT_OBJS=$(DUKE3D_OBJ)\file_lib.$o \
$(DUKE3D_OBJ)\control.$o \
$(DUKE3D_OBJ)\keyboard.$o \
$(DUKE3D_OBJ)\mouse.$o \
@ -110,7 +182,7 @@ JMACTOBJ=$(DUKE3D_OBJ)\file_lib.$o \
$(DUKE3D_OBJ)\mathutil.$o \
$(DUKE3D_OBJ)\scriplib.$o
GAMEOBJS=$(DUKE3D_OBJ)\game.$o \
DUKE3D_OBJS=$(DUKE3D_OBJ)\game.$o \
$(DUKE3D_OBJ)\game_inline.$o \
$(DUKE3D_OBJ)\actors.$o \
$(DUKE3D_OBJ)\actors_inline.$o \
@ -139,16 +211,16 @@ GAMEOBJS=$(DUKE3D_OBJ)\game.$o \
$(DUKE3D_OBJ)\osdcmds.$o \
$(DUKE3D_OBJ)\grpscan.$o \
$(DUKE3D_OBJ)\winbits.$o \
$(DUKE3D_OBJ)\gameres.res \
$(DUKE3D_OBJ)\gameres.$(res) \
$(DUKE3D_OBJ)\startwin.game.$o \
$(JMACTOBJ) \
$(MACT_OBJS) \
$(DUKE3D_OBJ)\sounds.$o \
$(DUKE3D_OBJ)\soundsdyn.$o \
!ifdef DEBUG
$(DUKE3D_OBJ)\mdump.$o
!endif
EDITOROBJS=$(DUKE3D_OBJ)\astub.$o \
DUKE3D_EDITOR_OBJS=$(DUKE3D_OBJ)\astub.$o \
$(DUKE3D_OBJ)\common.$o \
$(DUKE3D_OBJ)\mathutil.$o \
$(DUKE3D_OBJ)\m32def.$o \
@ -156,103 +228,127 @@ EDITOROBJS=$(DUKE3D_OBJ)\astub.$o \
$(DUKE3D_OBJ)\m32exec.$o \
$(DUKE3D_OBJ)\sounds_mapster32.$o \
$(DUKE3D_OBJ)\rev.$o \
$(DUKE3D_OBJ)\buildres.res \
$(DUKE3D_OBJ)\buildres.$(res) \
!ifdef DEBUG
$(DUKE3D_OBJ)\mdump.$o
!endif
!if ("$(RENDERTYPE)"=="WIN")
ENGINE_OBJS=$(ENGINE_OBJS) $(ENGINE_OBJ)\winlayer.$o $(ENGINE_OBJ)\rawinput.$o
!endif
!if ("$(RENDERTYPE)"=="SDL")
GAMEOBJS=$(GAMEOBJS) $(DUKE3D_OBJ)\game_icon.$o
EDITOROBJS=$(EDITOROBJS) $(DUKE3D_OBJ)\build_icon.$o
ENGINE_OBJS=$(ENGINE_OBJS) $(ENGINE_OBJ)\sdlayer.$o
DUKE3D_OBJS=$(DUKE3D_OBJS) $(DUKE3D_OBJ)\game_icon.$o
DUKE3D_EDITOR_OBJS=$(DUKE3D_EDITOR_OBJS) $(DUKE3D_OBJ)\build_icon.$o
!endif
!if ("$(MIXERTYPE)"=="WIN")
GAMEOBJS=$(GAMEOBJS) $(DUKE3D_OBJ)\midi.$o $(DUKE3D_OBJ)\music.$o $(DUKE3D_OBJ)\mpu401.$o
DUKE3D_OBJS=$(DUKE3D_OBJS) $(DUKE3D_OBJ)\midi.$o $(DUKE3D_OBJ)\music.$o $(DUKE3D_OBJ)\mpu401.$o
AUDIOLIB_OBJS=$(AUDIOLIB_OBJS) $(AUDIOLIB_OBJ)\driver_directsound.$o
AUDIOLIB_CFLAGS=$(AUDIOLIB_CFLAGS) /DHAVE_DS
!endif
!if ("$(MIXERTYPE)"=="SDL")
GAMEOBJS=$(GAMEOBJS) $(DUKE3D_OBJ)\sdlmusic.$o
DUKE3D_OBJS=$(DUKE3D_OBJS) $(DUKE3D_OBJ)\sdlmusic.$o
AUDIOLIB_OBJS=$(AUDIOLIB_OBJS) $(AUDIOLIB_OBJ)/driver_sdl.$o
AUDIOLIB_CFLAGS=$(AUDIOLIB_CFLAGS) /DHAVE_SDL
!endif
GAMEOBJS=$(GAMEOBJS) $(MUSICOBJ)
EDITOROBJS=$(EDITOROBJS) $(MUSICOBJ)
DUKE3D_OBJS=$(DUKE3D_OBJS) $(MUSICOBJ)
DUKE3D_EDITOR_OBJS=$(DUKE3D_EDITOR_OBJS) $(MUSICOBJ)
CHECKDIR_ENGINE=@if not exist "$(ENGINE_OBJ)" mkdir "$(ENGINE_OBJ)"
CHECKDIR_DUKE3D=@if not exist "$(DUKE3D_OBJ)" mkdir "$(DUKE3D_OBJ)"
CHECKDIR_ENET=@if not exist "$(ENET_OBJ)" mkdir "$(ENET_OBJ)"
CHECKDIR_AUDIOLIB=@if not exist "$(AUDIOLIB_OBJ)" mkdir "$(AUDIOLIB_OBJ)"
# RULES
.SUFFIXES: .masm
{$(ENGINE_SRC)}.masm{$(ENGINE_OBJ)}.$o:
$(CHECKDIR_ENGINE)
$(AS) /c $(ASFLAGS) /Fo$@ $<
{$(ENGINE_SRC)\util}.c{$(ENGINE_OBJ)}.$o:
$(CHECKDIR_ENGINE)
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(ENGINE_SRC)\misc}.rc{$(ENGINE_OBJ)}.$(res):
$(CHECKDIR_ENGINE)
$(RC) /i$(ENGINE_INC)\ /fo$@ /r $<
{$(ENGINE_SRC)}.c{$(ENGINE_OBJ)}.$o:
$(CHECKDIR_ENGINE)
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(ENGINE_SRC)}.cc{$(ENGINE_OBJ)}.$o:
$(CHECKDIR_ENGINE)
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(ENGINE_SRC)}.cpp{$(ENGINE_OBJ)}.$o:
$(CHECKDIR_ENGINE)
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(ENGINE_SRC)}.cxx{$(ENGINE_OBJ)}.$o:
$(CHECKDIR_ENGINE)
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(ENET_SRC)}.c{$(ENET_OBJ)}.$o:
$(CHECKDIR_ENET)
$(CC) /c $(CFLAGS) $(ENET_CFLAGS) /Fo$@ $<
{$(AUDIOLIB_SRC)}.c{$(AUDIOLIB_OBJ)}.$o:
$(CHECKDIR_AUDIOLIB)
$(CC) /c $(CFLAGS) $(AUDIOLIB_CFLAGS) /Fo$@ $<
{$(DUKE3D_SRC)\}.masm{$(DUKE3D_OBJ)\}.$o:
$(CHECKDIR_DUKE3D)
$(AS) /c $(ASFLAGS) /Fo$@ $<
{$(DUKE3D_SRC)\jmact}.c{$(DUKE3D_OBJ)\}.$o:
$(CHECKDIR_DUKE3D)
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(DUKE3D_SRC)\util}.c{$(DUKE3D_OBJ)\}.$o:
$(CHECKDIR_DUKE3D)
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(DUKE3D_SRC)\}.c{$(DUKE3D_OBJ)\}.$o:
$(CHECKDIR_DUKE3D)
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(DUKE3D_RSRC)\}.c{$(DUKE3D_OBJ)\}.$o:
$(CHECKDIR_DUKE3D)
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(DUKE3D_SRC)\}.cpp{$(DUKE3D_OBJ)\}.$o:
$(CHECKDIR_DUKE3D)
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(DUKE3D_SRC)\misc}.rc{$(DUKE3D_OBJ)\}.res:
{$(DUKE3D_SRC)\misc}.rc{$(DUKE3D_OBJ)\}.$(res):
$(CHECKDIR_DUKE3D)
$(RC) /i$(ENGINE_INC)\ /i$(DUKE3D_SRC)\ /DPOLYMER /fo$@ /r $<
# TARGETS
all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX)
all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX)
eduke32$(EXESUFFIX): $(GAMEOBJS) $(ENGINE_OBJ)\$(ENGINELIB) $(AUDIOLIB_ROOT)\$(JAUDIOLIB) $(ENETDIR)\$(ENETLIB)
eduke32$(EXESUFFIX): $(DUKE3D_OBJS) $(ENGINE_OBJS) $(AUDIOLIB_OBJS) $(ENET_OBJS)
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS $(WINMACHINE) /LIBPATH:$(PLATFORM)\lib$(WINLIB) /LIBPATH:$(AUDIOPLATFORM)\lib$(WINLIB) $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $(DUKE3D_RSRC)$(WINLIB)\manifest.game.xml -hashupdate -outputresource:$@ -out:$@.manifest
mapster32$(EXESUFFIX): $(EDITOROBJS) $(ENGINE_OBJ)\$(ENGINELIB) $(ENGINE_OBJ)\$(EDITORLIB) $(AUDIOLIB_ROOT)\$(JAUDIOLIB)
mapster32$(EXESUFFIX): $(DUKE3D_EDITOR_OBJS) $(ENGINE_OBJS) $(ENGINE_EDITOR_OBJS) $(AUDIOLIB_OBJS)
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS $(WINMACHINE) /LIBPATH:$(PLATFORM)\lib$(WINLIB) /LIBPATH:$(AUDIOPLATFORM)\lib$(WINLIB) $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $(DUKE3D_RSRC)$(WINLIB)\manifest.build.xml -hashupdate -outputresource:$@ -out:$@.manifest
!include Makefile.deps
!include $(ENGINE_ROOT)\Makefile.deps
enginelib editorlib: AlwaysBuild
-mkdir $(ENGINE_OBJ)
echo DUKE3D_OBJ=$(MAKEDIR)\$(ENGINE_OBJ)\ > $(ENGINE_OBJ)\overrides.mak
echo CFLAGS=$(ENGINEOPTS) >> $(ENGINE_OBJ)\overrides.mak
echo WINBITS=$(WINBITS) >> $(ENGINE_OBJ)\overrides.mak
echo RENDERTYPE=$(RENDERTYPE) >> $(ENGINE_OBJ)\overrides.mak
echo MIXERTYPE=$(MIXERTYPE) >> $(ENGINE_OBJ)\overrides.mak
cd $(ENGINE_ROOT)
nmake /f Makefile.msvc "OVERRIDES=$(MAKEDIR)\$(ENGINE_OBJ)\overrides.mak" $@
cd $(MAKEDIR)
# PHONIES
jaudiolib:
cd $(AUDIOLIB_ROOT)
nmake /f Makefile.msvc "MIXERTYPE=$(MIXERTYPE)" "WINBITS=$(WINBITS)"
cd $(MAKEDIR)
enet:
cd $(ENETDIR)
nmake /f Makefile.msvc "WINBITS=$(WINBITS)"
cd $(MAKEDIR)
AlwaysBuild: ;
$(ENGINE_OBJ)\$(EDITORLIB): editorlib ;
$(ENGINE_OBJ)\$(ENGINELIB): enginelib ;
$(AUDIOLIB_ROOT)\$(JAUDIOLIB): jaudiolib ;
$(ENETDIR)\$(ENETLIB): enet ;
# PHONIES
clean:
-del /Q $(DUKE3D_OBJ)\* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) \
*.pdb *.map *.manifest
-copy /y nul $(DUKE3D_OBJ)\keep.me
cd $(AUDIOLIB_ROOT)
nmake /f Makefile.msvc clean
cd $(MAKEDIR)\$(ENETDIR)
nmake /f Makefile.msvc clean
cd $(MAKEDIR)
-del /Q eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) $(DUKE3D_OBJS) $(DUKE3D_EDITOR_OBJS) *.pdb *.map *.manifest
veryclean: clean
-del /Q $(ENGINE_OBJ)\*
-copy /y nul $(ENGINE_OBJ)\keep.me
-del /Q $(ENGINE_OBJS) $(ENGINE_EDITOR_OBJS) $(ENET_OBJS) $(AUDIOLIB_OBJS)

View file

@ -1,218 +0,0 @@
# Build Makefile for Microsoft NMake
!ifdef OVERRIDES
!include $(OVERRIDES)
!endif
!ifndef RENDERTYPE
RENDERTYPE=WIN
!endif
ENGINE_SRC=src
!ifndef ENGINE_OBJ
ENGINE_OBJ=obj.msc
!endif
ENGINE_INC=include\ #
!ifndef CFLAGS
CFLAGS=/DUSE_OPENGL /DPOLYMER /DUSE_LIBPNG
!endif
o=obj
res=res
asm=masm
!ifndef WINBITS
WINBITS=32
!endif
!if ($(WINBITS)==64)
NOASM=1
!endif
ENGINELIB=engine.lib
EDITORLIB=build.lib
# this path should match eduke32\Makefile.msvc
# WDKROOT="H:\WinDDK\7600.16385.1"
# /D these to enable certain features of the port's compile process
# NOASM When defined, uses C instead of assembly code
!ifdef NOASM
TARGETOPTS=/DNOASM
!endif
!ifdef DEBUG
# debugging options
flags_cl=/Od /Zi
flags_link=/DEBUG
flags_lib=
!else
# release options
flags_cl=/O2 /GL /MP # /I$(WDKROOT)\inc\crt
!if ($(WINBITS)!=64)
flags_cl=$(flags_cl) /arch:SSE
!endif
flags_link=/RELEASE /LTCG # /LIBPATH:$(WDKROOT)\lib\Crt\i386 /LIBPATH:$(WDKROOT)\lib\wxp\i386
flags_lib=/LTCG
!endif
CC=cl
AS=ml
RC=rc
LINK=link /opt:ref /nologo
CFLAGS=$(CFLAGS) /nologo /MT /J $(flags_cl) $(TARGETOPTS) /I$(ENGINE_INC)
ASFLAGS=/nologo /coff /c
EXESUFFIX=.exe
!ifdef DEBUG
CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS /D "_CRT_SECURE_NO_DEPRECATE"
!endif
ENGINEOBJS= \
!ifdef NOASM
$(ENGINE_OBJ)\a-c.$o \
!else
$(ENGINE_OBJ)\a.$o \
!endif
$(ENGINE_OBJ)\baselayer.$o \
$(ENGINE_OBJ)\cache1d.$o \
$(ENGINE_OBJ)\compat.$o \
$(ENGINE_OBJ)\crc32.$o \
$(ENGINE_OBJ)\defs.$o \
$(ENGINE_OBJ)\engine.$o \
$(ENGINE_OBJ)\polymost.$o \
$(ENGINE_OBJ)\texcache.$o \
$(ENGINE_OBJ)\dxtfilter.$o \
$(ENGINE_OBJ)\hightile.$o \
$(ENGINE_OBJ)\mdsprite.$o \
$(ENGINE_OBJ)\textfont.$o \
$(ENGINE_OBJ)\smalltextfont.$o \
$(ENGINE_OBJ)\glbuild.$o \
$(ENGINE_OBJ)\kplib.$o \
$(ENGINE_OBJ)\lz4.$o \
$(ENGINE_OBJ)\lzwnew.$o \
$(ENGINE_OBJ)\osd.$o \
$(ENGINE_OBJ)\pragmas.$o \
$(ENGINE_OBJ)\scriptfile.$o \
$(ENGINE_OBJ)\polymer.$o \
$(ENGINE_OBJ)\mutex.$o \
$(ENGINE_OBJ)\winbits.$o \
$(ENGINE_OBJ)\xxhash.$o
EDITOROBJS=$(ENGINE_OBJ)\build.$o \
$(ENGINE_OBJ)\startwin.editor.$o \
$(ENGINE_OBJ)\config.$o
!if ("$(RENDERTYPE)"=="WIN")
ENGINEOBJS=$(ENGINEOBJS) $(ENGINE_OBJ)\winlayer.$o $(ENGINE_OBJ)\rawinput.$o
!endif
!if ("$(RENDERTYPE)"=="SDL")
ENGINEOBJS=$(ENGINEOBJS) $(ENGINE_OBJ)\sdlayer.$o
!endif
LIBS=$(LIBS) user32.lib gdi32.lib shell32.lib wsock32.lib comctl32.lib dxguid.lib
CFLAGS=$(CFLAGS) /DRENDERTYPE$(RENDERTYPE)=1 /DSDL_FRAMEWORK /DSDL_TARGET=2 /W2
# RULES
.SUFFIXES: .masm
{$(ENGINE_SRC)}.masm{$(ENGINE_OBJ)}.$o:
$(AS) /c $(ASFLAGS) /Fo$@ $<
{$(ENGINE_SRC)\util}.c{$(ENGINE_OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(ENGINE_SRC)\misc}.rc{$(ENGINE_OBJ)}.$(res):
$(RC) /i$(ENGINE_INC)\ /fo$@ /r $<
{$(ENGINE_SRC)}.c{$(ENGINE_OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(ENGINE_SRC)}.cc{$(ENGINE_OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(ENGINE_SRC)}.cpp{$(ENGINE_OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
{$(ENGINE_SRC)}.cxx{$(ENGINE_OBJ)}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
# TARGETS
UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2art$(EXESUFFIX) wad2map$(EXESUFFIX) kmd2tool$(EXESUFFIX) md2tool$(EXESUFFIX) generateicon$(EXESUFFIX) cacheinfo$(EXESUFFIX) arttool$(EXESUFFIX) givedepth$(EXESUFFIX) mkpalette$(EXESUFFIX) unpackssi$(EXESUFFIX) bsuite$(EXESUFFIX)
all: $(ENGINE_OBJ)\$(ENGINELIB) $(ENGINE_OBJ)\$(EDITORLIB);
utils: $(UTILS) ;
enginelib: $(ENGINE_OBJ)\$(ENGINELIB) ;
$(ENGINE_OBJ)\$(ENGINELIB): $(ENGINEOBJS)
lib $(flags_lib) /out:$@ /nologo $**
editorlib: $(ENGINE_OBJ)\$(EDITORLIB) ;
$(ENGINE_OBJ)\$(EDITORLIB): $(EDITOROBJS)
lib $(flags_lib) /out:$@ /nologo $**
# the tools
kextract$(EXESUFFIX): $(ENGINE_OBJ)\kextract.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
kgroup$(EXESUFFIX): $(ENGINE_OBJ)\kgroup.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
transpal$(EXESUFFIX): $(ENGINE_OBJ)\transpal.$o $(ENGINE_OBJ)\pragmas.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
wad2map$(EXESUFFIX): $(ENGINE_OBJ)\wad2map.$o $(ENGINE_OBJ)\pragmas.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
wad2art$(EXESUFFIX): $(ENGINE_OBJ)\wad2art.$o $(ENGINE_OBJ)\pragmas.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
kmd2tool$(EXESUFFIX): $(ENGINE_OBJ)\kmd2tool.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
md2tool$(EXESUFFIX): $(ENGINE_OBJ)\md2tool.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
generateicon$(EXESUFFIX): $(ENGINE_OBJ)\generateicon.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\pragmas.$o $(ENGINE_OBJ)\kplib.$o $(ENGINE_OBJ)\cache1d.$o $(ENGINE_OBJ)\compat_tools.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
cacheinfo$(EXESUFFIX): $(ENGINE_OBJ)\cacheinfo.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
arttool$(EXESUFFIX): $(ENGINE_OBJ)\arttool.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
givedepth$(EXESUFFIX): $(ENGINE_OBJ)\givedepth.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
mkpalette$(EXESUFFIX): $(ENGINE_OBJ)\mkpalette.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
unpackssi$(EXESUFFIX): $(ENGINE_OBJ)\unpackssi.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
bsuite$(EXESUFFIX): $(ENGINE_OBJ)\bsuite.$o
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
$(MT) -manifest $@.manifest -outputresource:$@
# DEPENDENCIES
!include Makefile.deps
# PHONIES
clean:
-del /Q $(ENGINEOBJS) $(EDITOROBJS) $(ENGINE_OBJ)\kextract.$o $(ENGINE_OBJ)\kgroup.$o $(ENGINE_OBJ)\transpal.$o $(ENGINE_OBJ)\wad2art.$o $(ENGINE_OBJ)\wad2map.$o $(ENGINE_OBJ)\kmd2tool.$o $(ENGINE_OBJ)\md2tool.$o $(ENGINE_OBJ)\generateicon.$o $(ENGINE_OBJ)\cacheinfo.$o $(ENGINE_OBJ)\arttool.$o $(ENGINE_OBJ)\givedepth.$o $(ENGINE_OBJ)\mkpalette.$o $(ENGINE_OBJ)\unpackssi.$o $(ENGINE_OBJ)\bsuite.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o $(ENGINE_OBJ)\pragmas.$o $(ENGINE_OBJ)\kplib.$o $(ENGINE_OBJ)\cache1d.$o
veryclean: clean
-del /Q $(ENGINE_OBJ)\$(ENGINELIB) $(ENGINE_OBJ)\$(EDITORLIB) $(UTILS) *.map *.manifest *.pdb

View file

@ -7,10 +7,6 @@
*
**************************************************************************/
#ifdef _MSC_VER
# include <dsound.h>
#else
// from: http://alleg.sourceforge.net/files/dx9mgw.zip
#define COM_NO_WINDOWS_H
@ -2355,5 +2351,3 @@ DEFINE_GUID(GUID_DSCFX_SYSTEM_NS, 0x5ab0882e, 0x7274, 0x4516, 0x87, 0x7d, 0x4e,
#ifdef __cplusplus
};
#endif // __cplusplus
#endif

View file

@ -1,49 +0,0 @@
OBJ=obj.msc
INC=include
SRC=src
ENETLIB=libenet.lib
!ifdef DEBUG
# debugging options
flags_cl=/Od /Zi
flags_link=/DEBUG
flags_lib=
!else
# release options
flags_cl=/Ox /GL
!if ($(WINBITS)!=64)
flags_cl=$(flags_cl) /arch:SSE
!endif
flags_link=/RELEASE /LTCG
flags_lib=/LTCG
!endif
CC=cl
LINK=link /opt:ref /nologo
CFLAGS=$(CFLAGS) /nologo /MT /J $(flags_cl) $(TARGETOPTS) /I$(INC) /I$(SRC)
!ifdef DEBUG
CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS
!endif
CFLAGS=$(CFLAGS) /D "_CRT_SECURE_NO_DEPRECATE" /W2 /Iinclude/msvc /DWIN32
OBJECTS=$(OBJ)\callbacks.o \
$(OBJ)\host.o \
$(OBJ)\list.o \
$(OBJ)\packet.o \
$(OBJ)\peer.o \
$(OBJ)\protocol.o \
$(OBJ)\win32.o \
$(OBJ)\compress.o
{$(SRC)}.c{$(OBJ)}.o:
$(CC) /c $(CFLAGS) /Fo$@ $<
enet: $(ENETLIB)
$(ENETLIB): $(OBJECTS)
lib $(flags_lib) /out:$@ /nologo $**
clean:
-del /Q $(OBJ)\* $(ENETLIB)

View file

@ -1,68 +0,0 @@
OBJ=obj.msc
INC=include
SRC=src
JFAUDIOLIB=libjfaudiolib.lib
!ifndef MIXERTYPE
MIXERTYPE=WIN
!endif
!ifdef DEBUG
# debugging options
flags_cl=/Od /Zi
flags_link=/DEBUG
flags_lib=
!else
# release options
flags_cl=/Ox /GL
!if ($(WINBITS)!=64)
flags_cl=$(flags_cl) /arch:SSE
!endif
flags_link=/RELEASE /LTCG
flags_lib=/LTCG
!endif
CC=cl
LINK=link /opt:ref /nologo
PLATFORM=..\..\platform\Windows
AUDIOINC=third-party\common
CFLAGS=$(CFLAGS) /nologo /MT /J $(flags_cl) $(TARGETOPTS) /I$(INC) /I$(SRC) /I$(PLATFORM)\include /I$(AUDIOINC)\include
!ifdef DEBUG
CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS
!endif
CFLAGS=$(CFLAGS) /DMIXERTYPE$(MIXERTYPE)=1 /DSDL_FRAMEWORK /DSDL_TARGET=2 /D "_CRT_SECURE_NO_DEPRECATE" /W2 /Iinclude/msvc /DHAVE_VORBIS /DHAVE_FLAC
OBJECTS=$(OBJ)\drivers.o \
$(OBJ)\fx_man.o \
$(OBJ)\multivoc.o \
$(OBJ)\mix.o \
$(OBJ)\mixst.o \
$(OBJ)\pitch.o \
$(OBJ)\formats.o \
$(OBJ)\vorbis.o \
$(OBJ)\flac.o \
$(OBJ)\xa.o \
$(OBJ)\driver_nosound.o
!if ("$(MIXERTYPE)"=="WIN")
CFLAGS=$(CFLAGS) /DHAVE_DS
OBJECTS=$(OBJECTS) $(OBJ)/driver_directsound.o
!endif
!if ("$(MIXERTYPE)"=="SDL")
CFLAGS=$(CFLAGS) /DHAVE_SDL
OBJECTS=$(OBJECTS) $(OBJ)/driver_sdl.o
!endif
{$(SRC)}.c{$(OBJ)}.o:
$(CC) /c $(CFLAGS) /Fo$@ $<
jfaudiolib: $(JFAUDIOLIB)
$(JFAUDIOLIB): $(OBJECTS)
lib $(flags_lib) /out:$@ /nologo $**
clean:
-del /Q $(OBJ)\* $(JFAUDIOLIB)

View file

@ -26,10 +26,6 @@
#define DIRECTSOUND_VERSION 0x0800
#define CINTERFACE
#ifdef _MSC_VER
#include <InitGuid.h>
#endif
#include <windows.h>
#include <mmsystem.h>
#include "dx/dsound.h"