* Removed unneeded headers from the "core" modules.
Most importantly, moved lang.h from base_config.h to config.h. Thus
the core modules (shared across all apps) and mapc couldn't care
less about whether they are built with ENABLE_NLS set to 1 or 0. No
hybrid builds should result.
* Added back 'main' un-definition, this time in the Makefile.
MinGW's 'sdl-config --cflags' outputs -Dmain=SDL_main in order to
allow SDL do initialisation and other Windows magic for the
so-called GUI apps, including standard output redirection to files.
We don't want this for mapc, though. (And it won't work anyway, if
we do not link with 'sdl-config --libs'.)
git-svn-id: https://s.snth.net/svn/neverball/trunk@1285
78b8d119-cf0a-0410-b17c-
f493084dd1d7
$(MAPC_TARG) : $(MAPC_OBJS)
$(CC) $(ALL_CFLAGS) -o $(MAPC_TARG) $(MAPC_OBJS) $(LDFLAGS) $(BASE_LIBS)
+# Work around some extremely helpful sdl-config scripts.
+
+ifdef MINGW
+$(MAPC_TARG) : ALL_CPPFLAGS := $(ALL_CPPFLAGS) -Umain
+endif
+
sols : $(SOLS)
locales :
* General Public License for more details.
*/
-#include <SDL.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
*/
#include <stdio.h>
-#include "lang.h"
/*---------------------------------------------------------------------------*/
* General Public License for more details.
*/
-#include <SDL.h>
#include <png.h>
#include <jpeglib.h>
#include "glext.h"
#include "base_config.h"
+#include "base_image.h"
/*---------------------------------------------------------------------------*/
#ifndef BASE_IMAGE_H
#define BASE_IMAGE_H
-#include <SDL.h>
-
/*---------------------------------------------------------------------------*/
void image_size(int *, int *, int, int);
#include <stdlib.h>
#include <string.h>
-#include <SDL.h>
-#include <SDL_byteorder.h>
+#include <SDL_endian.h>
/*---------------------------------------------------------------------------*/
*/
#include <SDL.h>
+
#include "base_config.h"
+#include "lang.h"
/*---------------------------------------------------------------------------*/
#include <string.h>
#include <math.h>
-/* HACK ALERT! */
-
-#if ENABLE_NLS
-#undef ENABLE_NLS
-#define ENABLE_NLS 0
-#endif
-
#include "vec3.h"
#include "solid.h"
#include "base_image.h"
* General Public License for more details.
*/
-#include <SDL.h>
-#include <SDL_rwops.h>
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>