2006-12-21 12:53:11 +00:00
|
|
|
# EDuke32 Makefile for Microsoft NMake
|
2014-07-23 07:21:29 +00:00
|
|
|
|
2017-02-01 10:20:54 +00:00
|
|
|
root=..\..\
|
2014-07-23 07:21:29 +00:00
|
|
|
|
2017-02-01 10:20:54 +00:00
|
|
|
obj=$(root)\obj
|
|
|
|
source=$(root)\source
|
|
|
|
|
|
|
|
ENGINE=build
|
|
|
|
ENGINE_ROOT=$(source)\$(ENGINE)
|
2014-07-23 07:21:29 +00:00
|
|
|
ENGINE_SRC=$(ENGINE_ROOT)\src
|
2014-07-22 07:25:54 +00:00
|
|
|
ENGINE_INC=$(ENGINE_ROOT)\include
|
2017-02-01 10:20:54 +00:00
|
|
|
ENGINE_OBJ=$(obj)\$(ENGINE)
|
|
|
|
|
|
|
|
DUKE3D=duke3d
|
|
|
|
DUKE3D_ROOT=$(source)\$(DUKE3D)
|
|
|
|
DUKE3D_SRC=$(DUKE3D_ROOT)\src
|
|
|
|
DUKE3D_OBJ=$(obj)\$(DUKE3D)
|
|
|
|
DUKE3D_RSRC=$(DUKE3D_ROOT)\rsrc
|
|
|
|
|
|
|
|
MACT=mact
|
|
|
|
MACT_ROOT=$(source)\$(MACT)
|
|
|
|
MACT_SRC=$(MACT_ROOT)\src
|
|
|
|
MACT_INC=$(MACT_ROOT)\include
|
|
|
|
MACT_OBJ=$(obj)\$(MACT)
|
|
|
|
|
|
|
|
AUDIOLIB=audiolib
|
|
|
|
AUDIOLIB_ROOT=$(source)\$(AUDIOLIB)
|
|
|
|
AUDIOLIB_OBJ=$(obj)\$(AUDIOLIB)
|
2014-07-23 07:21:29 +00:00
|
|
|
AUDIOLIB_INC=$(AUDIOLIB_ROOT)\include
|
|
|
|
AUDIOLIB_SRC=$(AUDIOLIB_ROOT)\src
|
|
|
|
|
2017-02-01 10:20:54 +00:00
|
|
|
ENET=enet
|
|
|
|
ENET_ROOT=$(source)\$(ENET)
|
|
|
|
ENET_OBJ=$(obj)\$(ENET)
|
2014-07-23 07:21:29 +00:00
|
|
|
ENET_INC=$(ENET_ROOT)\include
|
|
|
|
ENET_SRC=$(ENET_ROOT)\src
|
|
|
|
|
2018-02-17 06:38:15 +00:00
|
|
|
GLAD=glad
|
|
|
|
GLAD_ROOT=$(source)\$(GLAD)
|
|
|
|
GLAD_OBJ=$(obj)\$(GLAD)
|
|
|
|
GLAD_INC=$(GLAD_ROOT)\include
|
|
|
|
GLAD_SRC=$(GLAD_ROOT)\src
|
|
|
|
|
2017-06-10 08:19:35 +00:00
|
|
|
LIBXMPLITE=libxmp-lite
|
|
|
|
LIBXMPLITE_ROOT=$(source)\$(LIBXMPLITE)
|
|
|
|
LIBXMPLITE_OBJ=$(obj)\$(LIBXMPLITE)
|
|
|
|
LIBXMPLITE_INC=$(LIBXMPLITE_ROOT)\include
|
|
|
|
LIBXMPLITE_SRC=$(LIBXMPLITE_ROOT)\src
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
o=obj
|
2014-07-23 07:21:29 +00:00
|
|
|
res=res
|
|
|
|
asm=masm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CPLUSPLUS=1
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2014-02-11 07:39:09 +00:00
|
|
|
!ifndef WINBITS
|
|
|
|
WINBITS=32
|
|
|
|
!endif
|
|
|
|
|
2014-02-10 10:59:42 +00:00
|
|
|
WINLIB=\$(WINBITS)
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
|
2014-02-10 10:59:42 +00:00
|
|
|
!if ($(WINBITS)==32)
|
|
|
|
WINMACHINE=/MACHINE:X86
|
|
|
|
!elseif ($(WINBITS)==64)
|
|
|
|
WINMACHINE=/MACHINE:X64
|
|
|
|
!endif
|
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)
To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.
All compiler and linker warnings when building in 64-bit mode have been fixed.
Remaining 64-bit to-do:
- The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
- RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
- DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
- Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)
This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.
In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
|
|
|
|
2010-05-25 10:56:00 +00:00
|
|
|
# the WDK allows us to link against msvcrt.dll instead of msvcrxxx.dll
|
2012-12-14 17:13:17 +00:00
|
|
|
# WDKROOT="H:\WinDDK\7600.16385.1"
|
2017-02-01 10:20:54 +00:00
|
|
|
PLATFORM=$(root)\platform\Windows
|
2010-05-25 10:56:00 +00:00
|
|
|
|
2014-02-11 07:39:09 +00:00
|
|
|
!ifndef RENDERTYPE
|
|
|
|
RENDERTYPE=WIN
|
|
|
|
!endif
|
|
|
|
!ifndef MIXERTYPE
|
|
|
|
MIXERTYPE=WIN
|
|
|
|
!endif
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
!ifdef DEBUG
|
|
|
|
# debugging options
|
2015-10-20 07:14:56 +00:00
|
|
|
flags_cl=/Od /Zi # /analyze
|
2006-04-13 20:47:06 +00:00
|
|
|
flags_link=/DEBUG
|
|
|
|
!else
|
|
|
|
# release options
|
2014-02-11 07:39:09 +00:00
|
|
|
flags_cl=/O2 /GL /MP # /I$(WDKROOT)\inc\crt /I$(WDKROOT)\inc\api
|
|
|
|
!if ($(WINBITS)!=64)
|
|
|
|
flags_cl=$(flags_cl) /arch:SSE
|
|
|
|
!endif
|
2012-11-15 14:27:49 +00:00
|
|
|
flags_link=/RELEASE /LTCG # /LIBPATH:$(WDKROOT)\lib\wxp\i386 /LIBPATH:$(WDKROOT)\lib\Crt\i386
|
2006-04-13 20:47:06 +00:00
|
|
|
!endif
|
|
|
|
|
2017-07-18 20:53:00 +00:00
|
|
|
ENGINEOPTS=/DUSE_OPENGL /DPOLYMER /DSTARTUP_WINDOW /DUSE_LIBVPX /DHAVE_VORBIS /DHAVE_XMP
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2012-11-15 14:27:49 +00:00
|
|
|
!ifdef CPLUSPLUS
|
|
|
|
ENGINEOPTS=$(ENGINEOPTS) /TP
|
|
|
|
!endif
|
|
|
|
|
2014-02-10 10:59:42 +00:00
|
|
|
!if ($(WINBITS)==64)
|
|
|
|
NOASM=1
|
|
|
|
!endif
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
CC=cl
|
|
|
|
AS=ml
|
2016-06-05 04:46:28 +00:00
|
|
|
LINK=link /nologo /opt:ref
|
2007-09-11 00:52:38 +00:00
|
|
|
MT=mt
|
2017-07-18 20:53:27 +00:00
|
|
|
CFLAGS= /MT /J /nologo /std:c++latest $(flags_cl) \
|
2018-02-17 06:38:15 +00:00
|
|
|
/I$(DUKE3D_SRC) /I$(ENGINE_INC)\msvc /I$(ENGINE_INC) /I$(MACT_INC) /I$(AUDIOLIB_INC) /I$(ENET_INC) /I$(GLAD_INC) /I$(LIBXMPLITE_INC) \
|
2016-06-05 04:46:28 +00:00
|
|
|
/W2 $(ENGINEOPTS) \
|
2017-02-01 10:20:54 +00:00
|
|
|
/I$(PLATFORM)\include /DRENDERTYPE$(RENDERTYPE)=1 /DMIXERTYPE$(MIXERTYPE)=1 /DSDL_USEFOLDER /DSDL_TARGET=2
|
2014-07-23 07:21:29 +00:00
|
|
|
|
|
|
|
ENET_CFLAGS=/I$(ENET_INC) /I$(ENET_SRC)
|
2017-06-27 11:01:22 +00:00
|
|
|
LIBXMPLITE_CFLAGS=/I$(LIBXMPLITE_INC) /I$(LIBXMPLITE_INC)/libxmp-lite /I$(LIBXMPLITE_SRC) -DHAVE_ROUND -DLIBXMP_CORE_PLAYER -DBUILDING_STATIC
|
2016-06-05 04:46:28 +00:00
|
|
|
AUDIOLIB_CFLAGS=/I$(AUDIOLIB_INC) /I$(AUDIOLIB_SRC)
|
2014-07-23 07:21:29 +00:00
|
|
|
|
2019-08-13 02:53:51 +00:00
|
|
|
LIBS=user32.lib gdi32.lib shell32.lib winmm.lib ws2_32.lib comctl32.lib shlwapi.lib oleaut32.lib ole32.lib imm32.lib SetupAPI.Lib version.lib \
|
2017-07-18 20:53:00 +00:00
|
|
|
libogg.a libvorbis.a libvorbisfile.a libxmp-lite.a libvpx.a dxguid.lib dsound.lib advapi32.lib libcompat-to-msvc.a
|
2008-03-09 08:14:12 +00:00
|
|
|
|
2014-02-11 07:39:09 +00:00
|
|
|
!if ("$(RENDERTYPE)"=="SDL")
|
2016-06-21 00:34:03 +00:00
|
|
|
LIBS=libSDL2main.a libSDL2.a $(LIBS)
|
2014-02-11 07:39:09 +00:00
|
|
|
!endif
|
|
|
|
|
2010-05-25 10:56:00 +00:00
|
|
|
LIBS=/NODEFAULTLIB:glu32.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib /NODEFAULTLIB:libcmt.lib \
|
|
|
|
/NODEFAULTLIB:libcmtd.lib $(LIBS)
|
2008-03-09 08:14:12 +00:00
|
|
|
|
2014-02-10 10:59:42 +00:00
|
|
|
# NOASM When defined, uses C instead of assembly code
|
|
|
|
!ifdef NOASM
|
|
|
|
CFLAGS=$(CFLAGS) /DNOASM
|
|
|
|
!endif
|
|
|
|
|
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
|
2010-05-25 10:56:00 +00:00
|
|
|
CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS /D "_CRT_SECURE_NO_DEPRECATE"
|
|
|
|
LIBS=$(LIBS) msvcrtd.lib
|
2009-06-05 20:09:13 +00:00
|
|
|
!else
|
2010-05-25 10:56:00 +00:00
|
|
|
# comment msvcrt_winxp.obj if not using the WDK
|
2012-11-15 14:27:49 +00:00
|
|
|
LIBS=$(LIBS) msvcrt.lib # msvcrt_winxp.obj
|
2008-12-28 23:27:24 +00:00
|
|
|
!endif
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2014-07-23 07:21:29 +00:00
|
|
|
ENGINE_OBJS= \
|
|
|
|
!ifdef NOASM
|
|
|
|
$(ENGINE_OBJ)\a-c.$o \
|
|
|
|
!else
|
|
|
|
$(ENGINE_OBJ)\a.$o \
|
|
|
|
!endif
|
2017-02-01 10:20:54 +00:00
|
|
|
$(ENGINE_OBJ)\animvpx.$o \
|
2014-07-23 07:21:29 +00:00
|
|
|
$(ENGINE_OBJ)\baselayer.$o \
|
|
|
|
$(ENGINE_OBJ)\cache1d.$o \
|
2018-11-05 07:28:07 +00:00
|
|
|
$(ENGINE_OBJ)\klzw.$o \
|
2014-07-28 06:43:46 +00:00
|
|
|
$(ENGINE_OBJ)\common.$o \
|
2014-07-23 07:21:29 +00:00
|
|
|
$(ENGINE_OBJ)\compat.$o \
|
|
|
|
$(ENGINE_OBJ)\crc32.$o \
|
|
|
|
$(ENGINE_OBJ)\defs.$o \
|
2015-10-20 07:14:56 +00:00
|
|
|
$(ENGINE_OBJ)\colmatch.$o \
|
2014-07-23 07:21:29 +00:00
|
|
|
$(ENGINE_OBJ)\engine.$o \
|
2016-06-21 00:33:30 +00:00
|
|
|
$(ENGINE_OBJ)\clip.$o \
|
2016-06-21 00:33:14 +00:00
|
|
|
$(ENGINE_OBJ)\2d.$o \
|
2016-06-21 00:34:25 +00:00
|
|
|
$(ENGINE_OBJ)\tiles.$o \
|
2016-06-21 00:32:53 +00:00
|
|
|
$(ENGINE_OBJ)\hash.$o \
|
2016-06-21 00:33:06 +00:00
|
|
|
$(ENGINE_OBJ)\palette.$o \
|
2014-09-30 04:18:43 +00:00
|
|
|
$(ENGINE_OBJ)\glbuild.$o \
|
2018-06-13 19:15:26 +00:00
|
|
|
$(ENGINE_OBJ)\glsurface.$o \
|
2014-09-30 04:18:43 +00:00
|
|
|
$(ENGINE_OBJ)\texcache.$o \
|
|
|
|
$(ENGINE_OBJ)\kplib.$o \
|
|
|
|
$(ENGINE_OBJ)\hightile.$o \
|
2014-07-23 07:21:29 +00:00
|
|
|
$(ENGINE_OBJ)\polymost.$o \
|
2014-09-30 04:18:43 +00:00
|
|
|
$(ENGINE_OBJ)\polymer.$o \
|
|
|
|
$(ENGINE_OBJ)\mdsprite.$o \
|
|
|
|
$(ENGINE_OBJ)\voxmodel.$o \
|
2018-06-13 19:15:26 +00:00
|
|
|
$(ENGINE_OBJ)\tilepacker.$o \
|
2014-07-23 07:21:29 +00:00
|
|
|
$(ENGINE_OBJ)\dxtfilter.$o \
|
|
|
|
$(ENGINE_OBJ)\textfont.$o \
|
|
|
|
$(ENGINE_OBJ)\smalltextfont.$o \
|
|
|
|
$(ENGINE_OBJ)\lz4.$o \
|
2015-01-08 15:13:28 +00:00
|
|
|
$(ENGINE_OBJ)\md4.$o \
|
2014-07-28 09:00:28 +00:00
|
|
|
$(ENGINE_OBJ)\mmulti_null.$o \
|
2014-07-23 07:21:29 +00:00
|
|
|
$(ENGINE_OBJ)\osd.$o \
|
|
|
|
$(ENGINE_OBJ)\pragmas.$o \
|
2017-02-01 10:20:54 +00:00
|
|
|
$(ENGINE_OBJ)\rev.$o \
|
2014-07-23 07:21:29 +00:00
|
|
|
$(ENGINE_OBJ)\scriptfile.$o \
|
|
|
|
$(ENGINE_OBJ)\mutex.$o \
|
|
|
|
$(ENGINE_OBJ)\winbits.$o \
|
2016-06-21 00:33:19 +00:00
|
|
|
$(ENGINE_OBJ)\xxhash.$o \
|
2016-06-21 00:33:30 +00:00
|
|
|
$(ENGINE_OBJ)\screenshot.$o \
|
2018-07-14 21:36:44 +00:00
|
|
|
$(ENGINE_OBJ)\softsurface.$o \
|
2017-07-18 20:53:00 +00:00
|
|
|
$(ENGINE_OBJ)\mhk.$o \
|
|
|
|
$(ENGINE_OBJ)\pngwrite.$o \
|
2018-03-07 04:21:05 +00:00
|
|
|
$(ENGINE_OBJ)\miniz.$o \
|
2018-04-23 06:35:34 +00:00
|
|
|
$(ENGINE_OBJ)\miniz_tinfl.$o \
|
|
|
|
$(ENGINE_OBJ)\miniz_tdef.$o \
|
2018-03-07 04:21:05 +00:00
|
|
|
$(ENGINE_OBJ)\fix16.$o \
|
|
|
|
$(ENGINE_OBJ)\fix16_str.$o
|
2017-07-29 20:39:46 +00:00
|
|
|
|
2014-07-23 07:21:29 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2018-02-17 06:38:15 +00:00
|
|
|
GLAD_OBJS=$(GLAD_OBJ)\glad.$o \
|
|
|
|
!if ("$(RENDERTYPE)"=="WIN")
|
|
|
|
$(GLAD_OBJ)\glad_wgl.$o
|
|
|
|
!endif
|
|
|
|
|
2017-06-10 08:19:35 +00:00
|
|
|
LIBXMPLITE_OBJS=$(LIBXMPLITE_OBJ)\control.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\dataio.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\effects.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\filter.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\format.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\hio.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\lfo.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\load.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\load_helpers.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\memio.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\mixer.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\mix_all.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\period.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\player.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\read_event.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\scan.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\smix.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\virtual.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\common.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\itsex.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\it_load.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\mod_load.$o \
|
2017-10-15 23:09:59 +00:00
|
|
|
$(LIBXMPLITE_OBJ)\mtm_load.$o \
|
2017-06-10 08:19:35 +00:00
|
|
|
$(LIBXMPLITE_OBJ)\s3m_load.$o \
|
|
|
|
$(LIBXMPLITE_OBJ)\sample.$o \
|
2017-10-15 23:09:59 +00:00
|
|
|
$(LIBXMPLITE_OBJ)\xm_load.$o \
|
2017-06-10 08:19:35 +00:00
|
|
|
|
2014-07-23 07:21:29 +00:00
|
|
|
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 \
|
2016-11-09 22:51:45 +00:00
|
|
|
$(AUDIOLIB_OBJ)\xmp.$o \
|
2014-07-23 07:21:29 +00:00
|
|
|
$(AUDIOLIB_OBJ)\driver_nosound.$o
|
|
|
|
|
2019-03-01 08:51:50 +00:00
|
|
|
MACT_OBJS= \
|
2017-02-01 10:20:54 +00:00
|
|
|
$(MACT_OBJ)\control.$o \
|
|
|
|
$(MACT_OBJ)\keyboard.$o \
|
|
|
|
$(MACT_OBJ)\joystick.$o \
|
|
|
|
$(MACT_OBJ)\scriplib.$o \
|
|
|
|
$(MACT_OBJ)\animlib.$o
|
2016-06-05 04:46:28 +00:00
|
|
|
|
2014-07-23 07:21:29 +00:00
|
|
|
DUKE3D_OBJS=$(DUKE3D_OBJ)\game.$o \
|
2014-07-22 07:25:54 +00:00
|
|
|
$(DUKE3D_OBJ)\actors.$o \
|
|
|
|
$(DUKE3D_OBJ)\anim.$o \
|
2016-02-07 02:38:03 +00:00
|
|
|
$(DUKE3D_OBJ)\cheats.$o \
|
2016-02-07 02:38:16 +00:00
|
|
|
$(DUKE3D_OBJ)\sbar.$o \
|
2016-02-07 02:38:23 +00:00
|
|
|
$(DUKE3D_OBJ)\screentext.$o \
|
2016-02-13 21:05:57 +00:00
|
|
|
$(DUKE3D_OBJ)\screens.$o \
|
|
|
|
$(DUKE3D_OBJ)\cmdline.$o \
|
2014-07-22 07:25:54 +00:00
|
|
|
$(DUKE3D_OBJ)\common.$o \
|
|
|
|
$(DUKE3D_OBJ)\demo.$o \
|
|
|
|
$(DUKE3D_OBJ)\gamedef.$o \
|
|
|
|
$(DUKE3D_OBJ)\gameexec.$o \
|
|
|
|
$(DUKE3D_OBJ)\gamevars.$o \
|
|
|
|
$(DUKE3D_OBJ)\global.$o \
|
|
|
|
$(DUKE3D_OBJ)\input.$o \
|
|
|
|
$(DUKE3D_OBJ)\menus.$o \
|
|
|
|
$(DUKE3D_OBJ)\namesdyn.$o \
|
2019-03-21 02:24:19 +00:00
|
|
|
$(DUKE3D_OBJ)\network.$o \
|
2014-07-22 07:25:54 +00:00
|
|
|
$(DUKE3D_OBJ)\player.$o \
|
|
|
|
$(DUKE3D_OBJ)\premap.$o \
|
|
|
|
$(DUKE3D_OBJ)\savegame.$o \
|
|
|
|
$(DUKE3D_OBJ)\sector.$o \
|
|
|
|
$(DUKE3D_OBJ)\rts.$o \
|
|
|
|
$(DUKE3D_OBJ)\config.$o \
|
|
|
|
$(DUKE3D_OBJ)\osdfuncs.$o \
|
|
|
|
$(DUKE3D_OBJ)\osdcmds.$o \
|
|
|
|
$(DUKE3D_OBJ)\grpscan.$o \
|
|
|
|
$(DUKE3D_OBJ)\winbits.$o \
|
2014-07-23 07:21:29 +00:00
|
|
|
$(DUKE3D_OBJ)\gameres.$(res) \
|
2014-07-22 07:25:54 +00:00
|
|
|
$(DUKE3D_OBJ)\startwin.game.$o \
|
|
|
|
$(DUKE3D_OBJ)\sounds.$o \
|
|
|
|
$(DUKE3D_OBJ)\soundsdyn.$o \
|
2008-01-27 22:50:29 +00:00
|
|
|
!ifdef DEBUG
|
2014-07-22 07:25:54 +00:00
|
|
|
$(DUKE3D_OBJ)\mdump.$o
|
2008-01-27 22:50:29 +00:00
|
|
|
!endif
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2014-07-23 07:21:29 +00:00
|
|
|
DUKE3D_EDITOR_OBJS=$(DUKE3D_OBJ)\astub.$o \
|
2014-07-22 07:25:54 +00:00
|
|
|
$(DUKE3D_OBJ)\common.$o \
|
2014-07-28 09:00:28 +00:00
|
|
|
$(DUKE3D_OBJ)\grpscan.$o \
|
2014-07-28 06:44:37 +00:00
|
|
|
$(DUKE3D_OBJ)\m32common.$o \
|
2014-07-22 07:25:54 +00:00
|
|
|
$(DUKE3D_OBJ)\m32def.$o \
|
|
|
|
$(DUKE3D_OBJ)\m32vars.$o \
|
|
|
|
$(DUKE3D_OBJ)\m32exec.$o \
|
|
|
|
$(DUKE3D_OBJ)\sounds_mapster32.$o \
|
2014-07-23 07:21:29 +00:00
|
|
|
$(DUKE3D_OBJ)\buildres.$(res) \
|
2008-01-27 22:50:29 +00:00
|
|
|
!ifdef DEBUG
|
2014-07-22 07:25:54 +00:00
|
|
|
$(DUKE3D_OBJ)\mdump.$o
|
2008-01-27 22:50:29 +00:00
|
|
|
!endif
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2014-07-23 07:21:29 +00:00
|
|
|
!if ("$(RENDERTYPE)"=="WIN")
|
|
|
|
ENGINE_OBJS=$(ENGINE_OBJS) $(ENGINE_OBJ)\winlayer.$o $(ENGINE_OBJ)\rawinput.$o
|
|
|
|
!endif
|
2014-02-11 07:39:09 +00:00
|
|
|
!if ("$(RENDERTYPE)"=="SDL")
|
2014-07-23 07:21:29 +00:00
|
|
|
ENGINE_OBJS=$(ENGINE_OBJS) $(ENGINE_OBJ)\sdlayer.$o
|
2015-05-27 08:46:44 +00:00
|
|
|
DUKE3D_OBJS=$(DUKE3D_OBJS) $(DUKE3D_OBJ)\game_icon.$o
|
|
|
|
DUKE3D_EDITOR_OBJS=$(DUKE3D_EDITOR_OBJS) $(DUKE3D_OBJ)\build_icon.$o
|
2014-02-11 07:39:09 +00:00
|
|
|
!endif
|
|
|
|
|
|
|
|
!if ("$(MIXERTYPE)"=="WIN")
|
2014-07-23 07:21:29 +00:00
|
|
|
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
|
2014-02-11 07:39:09 +00:00
|
|
|
!endif
|
|
|
|
!if ("$(MIXERTYPE)"=="SDL")
|
2014-07-23 07:21:29 +00:00
|
|
|
DUKE3D_OBJS=$(DUKE3D_OBJS) $(DUKE3D_OBJ)\sdlmusic.$o
|
|
|
|
AUDIOLIB_OBJS=$(AUDIOLIB_OBJS) $(AUDIOLIB_OBJ)/driver_sdl.$o
|
2014-02-11 07:39:09 +00:00
|
|
|
!endif
|
|
|
|
|
2014-07-23 07:21:29 +00:00
|
|
|
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)"
|
2018-02-17 06:38:15 +00:00
|
|
|
CHECKDIR_GLAD=@if not exist "$(GLAD_OBJ)" mkdir "$(GLAD_OBJ)"
|
2017-02-01 10:20:54 +00:00
|
|
|
CHECKDIR_MACT=@if not exist "$(MACT_OBJ)" mkdir "$(MACT_OBJ)"
|
2014-07-23 07:21:29 +00:00
|
|
|
CHECKDIR_AUDIOLIB=@if not exist "$(AUDIOLIB_OBJ)" mkdir "$(AUDIOLIB_OBJ)"
|
2017-06-10 08:19:35 +00:00
|
|
|
CHECKDIR_LIBXMPLITE=@if not exist "$(LIBXMPLITE_OBJ)" mkdir "$(LIBXMPLITE_OBJ)"
|
2014-02-11 07:39:09 +00:00
|
|
|
|
2017-02-03 21:59:45 +00:00
|
|
|
EDUKE32_TARGET=$(root)\eduke32$(EXESUFFIX)
|
|
|
|
MAPSTER32_TARGET=$(root)\mapster32$(EXESUFFIX)
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
# RULES
|
|
|
|
.SUFFIXES: .masm
|
|
|
|
|
2014-07-23 07:21:29 +00:00
|
|
|
{$(ENGINE_SRC)}.masm{$(ENGINE_OBJ)}.$o:
|
|
|
|
$(CHECKDIR_ENGINE)
|
|
|
|
$(AS) /c $(ASFLAGS) /Fo$@ $<
|
|
|
|
|
|
|
|
{$(ENGINE_SRC)}.cpp{$(ENGINE_OBJ)}.$o:
|
|
|
|
$(CHECKDIR_ENGINE)
|
|
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
|
2017-02-01 10:20:54 +00:00
|
|
|
{$(ENGINE_SRC)}.c{$(ENGINE_OBJ)}.$o:
|
2014-07-23 07:21:29 +00:00
|
|
|
$(CHECKDIR_ENGINE)
|
|
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
|
|
|
|
{$(ENET_SRC)}.c{$(ENET_OBJ)}.$o:
|
|
|
|
$(CHECKDIR_ENET)
|
|
|
|
$(CC) /c $(CFLAGS) $(ENET_CFLAGS) /Fo$@ $<
|
|
|
|
|
2018-02-17 06:38:15 +00:00
|
|
|
{$(GLAD_SRC)}.c{$(GLAD_OBJ)}.$o:
|
|
|
|
$(CHECKDIR_GLAD)
|
|
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
|
2017-06-10 08:19:35 +00:00
|
|
|
{$(LIBXMPLITE_SRC)}.c{$(LIBXMPLITE_OBJ)}.$o:
|
|
|
|
$(CHECKDIR_LIBXMPLITE)
|
|
|
|
$(CC) /c $(CFLAGS) $(LIBXMPLITE_CFLAGS) /Fo$@ $<
|
|
|
|
|
2017-02-01 10:20:54 +00:00
|
|
|
{$(AUDIOLIB_SRC)}.cpp{$(AUDIOLIB_OBJ)}.$o:
|
2014-07-23 07:21:29 +00:00
|
|
|
$(CHECKDIR_AUDIOLIB)
|
|
|
|
$(CC) /c $(CFLAGS) $(AUDIOLIB_CFLAGS) /Fo$@ $<
|
|
|
|
|
2017-02-01 10:20:54 +00:00
|
|
|
{$(MACT_SRC)\}.cpp{$(MACT_OBJ)\}.$o:
|
|
|
|
$(CHECKDIR_MACT)
|
2006-04-13 20:47:06 +00:00
|
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
|
2014-07-22 07:25:54 +00:00
|
|
|
{$(DUKE3D_RSRC)\}.c{$(DUKE3D_OBJ)\}.$o:
|
2014-07-23 07:21:29 +00:00
|
|
|
$(CHECKDIR_DUKE3D)
|
2014-02-11 07:39:09 +00:00
|
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
|
2014-07-22 07:25:54 +00:00
|
|
|
{$(DUKE3D_SRC)\}.cpp{$(DUKE3D_OBJ)\}.$o:
|
2014-07-23 07:21:29 +00:00
|
|
|
$(CHECKDIR_DUKE3D)
|
2006-04-13 20:47:06 +00:00
|
|
|
$(CC) /c $(CFLAGS) /Fo$@ $<
|
|
|
|
|
2017-02-01 10:20:54 +00:00
|
|
|
{$(DUKE3D_RSRC)\}.rc{$(DUKE3D_OBJ)\}.$(res):
|
2014-07-23 07:21:29 +00:00
|
|
|
$(CHECKDIR_DUKE3D)
|
2014-07-28 06:43:16 +00:00
|
|
|
$(RC) /i$(ENGINE_INC)\ /i$(DUKE3D_SRC)\ /i$(DUKE3D_RSRC)\ /DPOLYMER /fo$@ /r $<
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
# TARGETS
|
|
|
|
|
2017-02-03 21:59:45 +00:00
|
|
|
|
|
|
|
all: $(EDUKE32_TARGET) $(MAPSTER32_TARGET)
|
|
|
|
|
2018-02-17 06:38:15 +00:00
|
|
|
$(EDUKE32_TARGET): $(DUKE3D_OBJS) $(ENGINE_OBJS) $(AUDIOLIB_OBJS) $(MACT_OBJS) $(ENET_OBJS) $(GLAD_OBJS) $(LIBXMPLITE_OBJS)
|
2017-02-01 10:20:54 +00:00
|
|
|
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS $(WINMACHINE) /LIBPATH:$(PLATFORM)\lib$(WINLIB) $(flags_link) /MAP $** $(LIBS)
|
2016-03-14 00:06:45 +00:00
|
|
|
$(MT) -manifest $(DUKE3D_RSRC)\manifest.game.xml -hashupdate -outputresource:$@ -out:$@.manifest
|
2016-06-05 04:46:28 +00:00
|
|
|
|
2018-02-17 06:38:15 +00:00
|
|
|
$(MAPSTER32_TARGET): $(DUKE3D_EDITOR_OBJS) $(ENGINE_OBJS) $(ENGINE_EDITOR_OBJS) $(AUDIOLIB_OBJS) $(GLAD_OBJS)
|
2017-02-01 10:20:54 +00:00
|
|
|
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS $(WINMACHINE) /LIBPATH:$(PLATFORM)\lib$(WINLIB) $(flags_link) /MAP $** $(LIBS)
|
2016-03-14 00:06:45 +00:00
|
|
|
$(MT) -manifest $(DUKE3D_RSRC)\manifest.build.xml -hashupdate -outputresource:$@ -out:$@.manifest
|
2016-06-05 04:46:28 +00:00
|
|
|
|
2017-02-01 10:20:54 +00:00
|
|
|
!include $(DUKE3D_ROOT)\Dependencies.mak
|
|
|
|
!include $(ENGINE_ROOT)\Dependencies.mak
|
2014-07-23 07:21:29 +00:00
|
|
|
|
|
|
|
# PHONIES
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
clean:
|
2017-06-10 08:19:35 +00:00
|
|
|
-del /Q $(EDUKE32_TARGET) $(MAPSTER32_TARGET) $(DUKE3D_OBJS) $(DUKE3D_EDITOR_OBJS) $(ENGINE_OBJS) $(ENGINE_EDITOR_OBJS) *.pdb $(root)\*.pdb $(root)\*.map $(root)\*.manifest
|
2018-02-17 06:38:15 +00:00
|
|
|
-del /Q $(ENET_OBJS) $(LIBXMPLITE_OBJS) $(MACT_OBJS) $(AUDIOLIB_OBJS) $(GLAD_OBJS)
|
2006-04-13 20:47:06 +00:00
|
|
|
veryclean: clean
|