Compatibility improvements.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2255 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+5
-5
@@ -7,18 +7,18 @@
|
||||
|
||||
TARGET = mapgen
|
||||
# These flags are needed to get it to compile with libpngX.dll on CYGWIN
|
||||
CYGWINFLAGS = -DPNG_USE_DLL
|
||||
#CYGWINFLAGS =
|
||||
#CYGWINFLAGS = -DPNG_USE_DLL
|
||||
CYGWINFLAGS =
|
||||
PNGFLAGS = -I.
|
||||
SDLFLAGS = $(shell sdl-config --cflags)
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -W -Wall -O0 # -g
|
||||
CFLAGS += -W -Wall -O0 # -g
|
||||
LIBS = -L/usr/local/lib -lpng -lm -lSDL_ttf -lSDL_image
|
||||
LDFLAGS = $(shell sdl-config --libs)
|
||||
LDFLAGS += $(shell sdl-config --libs)
|
||||
|
||||
BINS = $(TARGET) $(TARGET).exe
|
||||
OBJS = mapgen.o alist.o scriptlib.o stringbank.o unicode.o sdlpngdrv.o SDL_gfxPrimitives.o
|
||||
OBJS = mapgen.o alist.o scriptlib.o stringbank.o unicode.o sdlpngdrv.o SDL_gfxPrimitives.o port.o
|
||||
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#include "port.h"
|
||||
|
||||
#ifndef HAVE_STRUPR
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
char *
|
||||
strupr (char *str)
|
||||
{
|
||||
char *ptr;
|
||||
|
||||
ptr = str;
|
||||
while (*ptr)
|
||||
{
|
||||
*ptr = (char) toupper (*ptr);
|
||||
ptr++;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -14,5 +14,17 @@
|
||||
|
||||
#define countof(a) ( sizeof(a)/sizeof(*a) )
|
||||
|
||||
#ifdef __WIN32__
|
||||
# define HAVE_STRICMP
|
||||
# define HAVE_STRUPR
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef HAVE_STRICMP
|
||||
# define stricmp strcasecmp
|
||||
#else
|
||||
# define strcasecmp stricmp
|
||||
#endif
|
||||
|
||||
#endif /* _PORT_H */
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "mapdrv.h"
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "SDL.h"
|
||||
#include "SDL_image.h"
|
||||
|
||||
Reference in New Issue
Block a user