#  makefile for Marauder

GCC_FLAGS = -MMD -Wall -m486 -O3

MSVC_FLAGS = -W3 -WX -Gd -Ox -GB -MT

GCC_OBJS = alien.o bullet.o fire.o game.o genes.o marauder.o mgr.o sprite.o

MSVC_OBJS = alien.obj bullet.obj fire.obj game.obj genes.obj \
	    marauder.obj mgr.obj sprite.obj

%.o : %.cpp
	gcc $(GCC_FLAGS) -c $< -o $@

%.obj : %.cpp
	cl -nologo $(MSVC_FLAGS) -c $< -Fo$@

marauder.exe : $(GCC_OBJS)
	gcc -s -o marauder.exe $(GCC_OBJS) -lalleg

mar_win.exe : $(MSVC_OBJS)
	cl -nologo -Femar_win.exe $(MSVC_OBJS) alleg.lib

marauder: $(GCC_OBJS)
	gcc -s -o marauder $(GCC_OBJS) -lalleg -lX11 -L/usr/X11R6/lib

clean:
	rm -f *.o *.obj *.d *.exe marauder

DEPS := $(wildcard *.d)
ifneq ($(DEPS),)
include $(DEPS)
endif
