Adding win32 makefile

This commit is contained in:
Niels Nesse 2015-11-23 00:42:39 -08:00
parent 41c1b40612
commit b98c2e6b49
5 changed files with 18 additions and 8 deletions

5
Makefile Normal file
View File

@ -0,0 +1,5 @@
PROG = tbftss
CC = gcc
CXXFLAGS += -DUNIX
include common.mk

4
Makefile.win32 Normal file
View File

@ -0,0 +1,4 @@
PROG = tbftss.exe
CC=x86_64-w64-mingw32-gcc
include common.mk

View File

@ -4,9 +4,8 @@ VERSION = 0.4
REVISION = $(shell date +"%y%m%d")
DEBUG = 0
CXXFLAGS += `sdl2-config --cflags` -DVERSION=$(VERSION) -DREVISION=$(REVISION) -DUNIX=1 -DDEBUG=$(DEBUG)
CXXFLAGS += -DUNIX
CXXFLAGS += $(CFLAGS) -Wall -ansi -pedantic -Werror -Wstrict-prototypes
CXXFLAGS += `sdl2-config --cflags` -DVERSION=$(VERSION) -DREVISION=$(REVISION) -DDEBUG=$(DEBUG)
CXXFLAGS += -Wall -ansi -pedantic -Werror -Wstrict-prototypes
CXXFLAGS += -g -lefence
LIBS = `sdl2-config --libs` -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lm
@ -43,7 +42,7 @@ all: $(PROG)
# compiling other source files.
%.o: %.c %.h $(DEPS)
$(CC) $(CXXFLAGS) -c $<
$(CC) $(CFLAGS) $(CXXFLAGS) -c $<
# linking the program.
$(PROG): $(OBJS)

View File

@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
typedef struct SDL_Texture SDL_Texture;
struct SDL_Texture;
typedef struct Texture Texture;
typedef struct Lookup Lookup;
typedef struct Weapon Weapon;
@ -43,7 +43,7 @@ typedef struct {
struct Texture {
char name[MAX_DESCRIPTION_LENGTH];
long hash;
SDL_Texture *texture;
struct SDL_Texture *texture;
Texture *next;
};
@ -115,7 +115,7 @@ struct Entity {
Entity *owner;
void (*action)(void);
void (*die)(void);
SDL_Texture *texture;
struct SDL_Texture *texture;
Entity *next;
};

View File

@ -21,7 +21,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "init.h"
#if UNIX
static void createSaveFolder(void);
#endif
static void loadConfig(void);
void saveConfig(void);
static void initColor(SDL_Color *c, int r, int g, int b);