Common.mak: Massive reorganization/cleanup.

Any functional changes are incidental and minor, other than the outright removals.

git-svn-id: https://svn.eduke32.com/eduke32@6147 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-06-09 06:38:42 +00:00
parent 9444fecf1e
commit b3d597200b
9 changed files with 614 additions and 752 deletions

1282
Common.mak

File diff suppressed because it is too large Load diff

View file

@ -121,10 +121,7 @@ ifeq ($(RENDERTYPE),SDL)
ENGINE_OBJS+= sdlayer.cpp
ifeq (1,$(HAVE_GTK2))
ENGINE_OBJS+= gtkbits.cpp
ifeq ($(LINKED_GTK),0)
ENGINE_OBJS+= dynamicgtk.cpp
endif
ENGINE_OBJS+= gtkbits.cpp dynamicgtk.cpp
ifeq ($(STARTUP_WINDOW),1)
ENGINE_EDITOR_OBJS+= startgtk.editor.cpp
endif
@ -195,12 +192,8 @@ ifeq ($(PLATFORM),WINDOWS)
endif
ifeq ($(MIXERTYPE),SDL)
ifneq ($(PLATFORM),DARWIN)
ifneq ($(PLATFORM),WINDOWS)
ifneq ($(PLATFORM),WII)
AUDIOLIB_CFLAGS+=`$(PKG_CONFIG) --cflags vorbis`
endif
endif
ifeq (,$(filter $(PLATFORM),DARWIN WINDOWS WII))
AUDIOLIB_CFLAGS+=`$(PKG_CONFIG) --cflags vorbis`
endif
AUDIOLIB_OBJS+= driver_sdl.cpp
endif
@ -330,13 +323,12 @@ KENBUILD_EDITOR_OBJS = \
KENBUILD_GAME_RSRC_OBJS =
KENBUILD_EDITOR_RSRC_OBJS =
ifeq (1,$(HAVE_GTK2))
KENBUILD_GAME_OBJS+= startgtk.game.cpp
KENBUILD_GAME_RSRC_OBJS+= game_banner.c
KENBUILD_EDITOR_RSRC_OBJS+= build_banner.c
endif
ifeq ($(RENDERTYPE),SDL)
ifeq (1,$(HAVE_GTK2))
KENBUILD_GAME_OBJS+= startgtk.game.cpp
KENBUILD_GAME_RSRC_OBJS+= game_banner.c
KENBUILD_EDITOR_RSRC_OBJS+= build_banner.c
endif
KENBUILD_GAME_RSRC_OBJS+= game_icon.c
KENBUILD_EDITOR_RSRC_OBJS+= build_icon.c
endif
@ -582,13 +574,12 @@ ifeq ($(PLATFORM),WII)
LIBS += -lvorbisidec
endif
ifeq (11,$(HAVE_GTK2)$(STARTUP_WINDOW))
DUKE3D_GAME_OBJS+= startgtk.game.cpp
DUKE3D_GAME_RSRC_OBJS+= game_banner.c
DUKE3D_EDITOR_RSRC_OBJS+= build_banner.c
endif
ifeq ($(RENDERTYPE),SDL)
ifeq (11,$(HAVE_GTK2)$(STARTUP_WINDOW))
DUKE3D_GAME_OBJS+= startgtk.game.cpp
DUKE3D_GAME_RSRC_OBJS+= game_banner.c
DUKE3D_EDITOR_RSRC_OBJS+= build_banner.c
endif
DUKE3D_GAME_RSRC_OBJS+= game_icon.c
DUKE3D_EDITOR_RSRC_OBJS+= build_icon.c
endif
@ -727,13 +718,12 @@ SW_EDITOR_OBJS = \
SW_GAME_RSRC_OBJS =
SW_EDITOR_RSRC_OBJS =
ifeq (1,$(HAVE_GTK2))
SW_GAME_OBJS+= startgtk.game.cpp
SW_GAME_RSRC_OBJS+= game_banner.c
SW_EDITOR_RSRC_OBJS+= build_banner.c
endif
ifeq ($(RENDERTYPE),SDL)
ifeq (1,$(HAVE_GTK2))
SW_GAME_OBJS+= startgtk.game.cpp
SW_GAME_RSRC_OBJS+= game_banner.c
SW_EDITOR_RSRC_OBJS+= build_banner.c
endif
SW_GAME_RSRC_OBJS+= game_icon.c
SW_EDITOR_RSRC_OBJS+= game_icon.c
endif

View file

@ -381,15 +381,6 @@ defined __x86_64__ || defined __amd64__ || defined _M_X64 || defined _M_IA64 ||
#endif
////////// External library headers //////////
#ifdef EFENCE
# include <efence.h>
#elif defined DMALLOC
# include <dmalloc.h>
#endif
////////// DEPRECATED: Standard library prefixing //////////
#ifdef _MSC_VER

View file

@ -12,8 +12,6 @@
#error You need at least 2.4.0 version of GTK+
#endif
#if !defined(LINKED_GTK)
#ifndef G_GNUC_NULL_TERMINATED
/* this is a glib-2.8.x thing: */
#define G_GNUC_NULL_TERMINATED
@ -605,6 +603,4 @@ void dynamicgtk_uninit(void);
#endif /* __dynamicgtkfoo__ */
#endif /* LINKED_GTK */
#endif /* dynamicgtk_h_ */

View file

@ -55,14 +55,13 @@ extern struct sdlappicon sdlappicon;
#endif
void gtkbuild_init(int32_t *argc, char ***argv)
{
#ifndef LINKED_GTK
gtkenabled = dynamicgtk_init();
if (gtkenabled < 0)
{
gtkenabled = 0;
return;
}
#endif
gtkenabled = gtk_init_check(argc, argv);
if (!gtkenabled) return;
#ifdef RENDERTYPESDL
@ -80,7 +79,6 @@ void gtkbuild_exit(int32_t r)
{
if (appicon) g_object_unref((gpointer)appicon);
}
#ifndef LINKED_GTK
dynamicgtk_uninit();
#endif
}

View file

@ -1,13 +1,7 @@
#include "gtkpixdata.h"
#if defined(LINKED_GTK)
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixdata.h>
#include <gdk/gdkkeysyms.h>
#else
#include "dynamicgtk.h"
#endif
#include "build.h"
#include "editor.h"

View file

@ -24,12 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "gtkpixdata.h"
#if defined(LINKED_GTK)
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixdata.h>
#else
#include "dynamicgtk.h"
#endif
#include "duke3d.h"
#include "grpscan.h"

View file

@ -11,9 +11,7 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#ifndef LINKED_GTK
# include "dynamicgtk.h"
#endif
#include "dynamicgtk.h"
#include "baselayer.h"
#include "compat.h"

View file

@ -10,9 +10,7 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#ifndef LINKED_GTK
# include "dynamicgtk.h"
#endif
#include "dynamicgtk.h"
#include "types.h"
#include "build.h"