Support building without a startup window through the Makefile. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5928 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2016-11-09 22:51:33 +00:00
parent 4ca5e25e2c
commit 466f3aca30
9 changed files with 34 additions and 9 deletions

View File

@ -510,8 +510,12 @@ ifeq ($(PLATFORM),WINDOWS)
endif
LIBS += -lFLAC -lvorbisfile -lvorbis -logg
LIBDIRS += -L$(AUDIOLIB_ROOT)/third-party/Windows/lib$(WINLIB)
DUKE3D_GAME_OBJS+= gameres winbits startwin.game
DUKE3D_EDITOR_OBJS+= buildres
ifeq ($(STARTUP_WINDOW),1)
DUKE3D_GAME_OBJS+= gameres winbits startwin.game
DUKE3D_EDITOR_OBJS+= buildres
else
DUKE3D_GAME_OBJS+= winbits
endif
ifeq ($(MIXERTYPE),WIN)
LIBS+= -ldsound
MIDI_OBJS=music midi mpu401

View File

@ -187,6 +187,7 @@ else
HAVE_XMP ?= 0
endif
NETCODE ?= 1
STARTUP_WINDOW ?= 1
LUNATIC ?= 0
USE_LUAJIT_2_1 ?= 0
@ -654,6 +655,10 @@ ifneq (0,$(USE_LIBVPX))
COMPILERFLAGS+= -DUSE_LIBVPX
endif
ifneq (0,$(STARTUP_WINDOW))
COMPILERFLAGS+= -DSTARTUP_WINDOW
endif
ifneq (0,$(HAVE_VORBIS))
COMPILERFLAGS+= -DHAVE_VORBIS
endif

View File

@ -110,12 +110,12 @@ $(DUKE3D_OBJ)/m32vars.$o: $(DUKE3D_SRC)/m32vars.c $(DUKE3D_SRC)/m32structures.c
# TODO: m32common.c
# misc objects
$(DUKE3D_OBJ)/game_icon.$o: $(DUKE3D_RSRC)/game_icon.c
$(DUKE3D_OBJ)/build_icon.$o: $(DUKE3D_RSRC)/build_icon.c
$(DUKE3D_OBJ)/game_icon.$o: $(DUKE3D_RSRC)/game_icon.c $(DUKE3D_RSRC)/game_icon.ico
$(DUKE3D_OBJ)/build_icon.$o: $(DUKE3D_RSRC)/build_icon.c $(DUKE3D_RSRC)/build_icon.ico
$(DUKE3D_OBJ)/grpscan.$o: $(DUKE3D_SRC)/grpscan.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/scriptfile.h $(ENGINE_INC)/cache1d.h $(ENGINE_INC)/crc32.h $(DUKE3D_INC)/grpscan.h
$(DUKE3D_OBJ)/gameres.$o: $(DUKE3D_SRC)/misc/gameres.rc $(DUKE3D_SRC)/startwin.game.h $(DUKE3D_RSRC)/game.bmp $(DUKE3D_RSRC)/game_icon.ico
$(DUKE3D_OBJ)/buildres.$o: $(DUKE3D_SRC)/misc/buildres.rc $(ENGINE_INC)/startwin.editor.h $(DUKE3D_RSRC)/build.bmp $(DUKE3D_RSRC)/build_icon.ico
$(DUKE3D_OBJ)/gameres.$o: $(DUKE3D_SRC)/misc/gameres.rc $(DUKE3D_SRC)/startwin.game.h $(DUKE3D_RSRC)/game.bmp
$(DUKE3D_OBJ)/buildres.$o: $(DUKE3D_SRC)/misc/buildres.rc $(ENGINE_INC)/startwin.editor.h $(DUKE3D_RSRC)/build.bmp
$(DUKE3D_OBJ)/startwin.game.$o: $(DUKE3D_SRC)/startwin.game.c $(duke3d_h) $(ENGINE_INC)/build.h $(ENGINE_INC)/winlayer.h $(ENGINE_INC)/compat.h $(DUKE3D_INC)/grpscan.h
$(DUKE3D_OBJ)/startgtk.game.$o: $(DUKE3D_SRC)/startgtk.game.c $(duke3d_h) $(ENGINE_INC)/dynamicgtk.h $(ENGINE_INC)/build.h $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/compat.h

View File

@ -75,7 +75,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 /DUSE_LIBVPX /DHAVE_VORBIS #/DHAVE_FLAC
ENGINEOPTS=/DUSE_OPENGL /DPOLYMER /DSTARTUP_WINDOW /DUSE_LIBPNG /DUSE_LIBVPX /DHAVE_VORBIS #/DHAVE_FLAC
!ifdef CPLUSPLUS
ENGINEOPTS=$(ENGINEOPTS) /TP

View File

@ -6,6 +6,8 @@
#endif
#undef STARTUP_SETUP_WINDOW
#ifdef STARTUP_WINDOW
#if defined _WIN32 || (defined RENDERTYPESDL && ((defined __APPLE__ && defined OSX_STARTUPWINDOW) || defined HAVE_GTK2))
# define STARTUP_SETUP_WINDOW
#endif
@ -14,3 +16,4 @@
#if defined _WIN32 || (defined RENDERTYPESDL && ((defined __APPLE__ && defined OSX_STARTUPWINDOW) || defined HAVE_GTK2 || SDL_MAJOR_VERSION==2))
# define WM_MSGBOX_WINDOW
#endif
#endif

View File

@ -3,6 +3,10 @@
#endif
#include "compat.h"
#include "renderlayer.h"
#ifdef STARTUP_SETUP_WINDOW
#include "build.h"
#include "editor.h"
#include "winlayer.h"
@ -490,3 +494,4 @@ int32_t startwin_run(void)
return done;
}
#endif // STARTUP_SETUP_WINDOW

View File

@ -143,6 +143,7 @@
<ClInclude Include="build\include\prlights.h" />
<ClInclude Include="build\include\lz4.h" />
<ClInclude Include="build\include\rawinput.h" />
<ClInclude Include="build\include\renderlayer.h" />
<ClInclude Include="build\include\scriptfile.h" />
<ClInclude Include="build\include\sdlayer.h" />
<ClInclude Include="build\include\sdl_inc.h" />

View File

@ -543,6 +543,9 @@
<ClInclude Include="build\include\m32script.h">
<Filter>eduke32\headers\editor</Filter>
</ClInclude>
<ClInclude Include="build\include\renderlayer.h">
<Filter>build\headers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="build\src\a-c.c">

View File

@ -24,12 +24,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#error Only for Windows
#endif
#include "compat.h"
#include "renderlayer.h"
#ifdef STARTUP_SETUP_WINDOW
#include "duke3d.h"
#include "sounds.h"
#include "build.h"
#include "renderlayer.h"
#include "compat.h"
#include "grpscan.h"
@ -799,3 +802,4 @@ int32_t startwin_run(void)
return done;
}
#endif // STARTUP_SETUP_WINDOW