CROSSDIR = /usr/local/cross-gcc33/i386-mingw32msvc
CC = $(CROSSDIR)/bin/gcc
DEBUG = 
CFLAGS = -Iinclude -I$(CROSSDIR)/include/SDL \
         -O2 -Wall -fsigned-char -Wno-char-subscripts
LFLAGS = -lmingw32 -lSDLmain -lSDL -mwindows -lwsock32 -lcomdlg32 
DEFINES = -DWIN -DWIN32 -DCD_VERSION -DCROSSCOMPILER -DDEBUG_DISABLED

OBJECTS = icon.o highdirent.o cpu.o human.o myiff.o specials.o \
	anim.o crowd.o intro.o os_control.o teamsetup.o \
	refree.o data.o league.o os_init.o	tables.o \
	arcade.o speed_data.o lists.o os_video.o tactics.o \
	chunkyblitting.o display.o loops.o ball.o teams.o \
	commento.o etw.o main.o goalkeeper.o freq.o \
	computer.o etw_locale.o	menu.o radar.o utility.o \
	config.o font.o menu_config.o replay.o speed_tables.o \
	connection.o generic_video.o menu_data.o sound.o wc.o \
	control.o gfx.o menu_font.o special.o network.o \
	highsocket.o

.c.o: eat.h menu.h
	$(CC) $(CFLAGS) $(DEFINES) -c $<


etw.exe: $(OBJECTS)
	$(CC) -o $@ $(CROSSDIR)/lib/libSDLmain.a $(OBJECTS) $(LFLAGS)

icon.o: Script1.rc
	$(CROSSDIR)/../bin/i386-mingw32msvc-windres $< $@
   
clean:
	rm -rf *.o
