# Makefile generated by Visual-MinGW 0.53a alpha.
# More information: http://visual-mingw.sourceforge.net/


# Suffixes
#
.SUFFIXES:
.SUFFIXES: .c .cpp .rc .o .res

# Directories
#
top_srcdir = .
VPATH = ./docs:./.

MWINDOWS = -mwindows

# Dependencies generator
#
CPP = cpp
MAKEDEPEND = $(CPP) -MM $< -MT $@ -MP $(INCLUDES) $(CPPFLAGS)


# Configuration 1, "Debug"
#
ifeq ($(CFG),Debug)
# directories
OBJDIR = $(top_srcdir)/.
DEPDIR = $(top_srcdir)/_deps
# names of programs
ifndef WINE
CC = gcc
CPP = cpp
CXX = g++
RC = windres -O COFF
else
CC = winegcc
CPP = winecpp
CXX = wineg++
RC = wrc
endif
AR = ar
ARFLAGS = -cru
RANLIB = ranlib
DLLWRAP = dllwrap
RM = rm -f
# compiler flags
INCLUDES =
RCINCLUDES =
SYMBOLS = -g
OPTIMIZE =
WARNINGS = -W -Wall
CPPFLAGS = 
CFLAGS = $(SYMBOLS) $(OPTIMIZE)
ALL_CFLAGS = $(WARNINGS)  $(CFLAGS)
ALL_CXXFLAGS = $(WARNINGS)  $(CFLAGS)
# linker flags
STRIP =
LIBDIRS =
LIBS = -lalleg
LDFLAGS = $(STRIP) $(MWINDOWS) 
# target
target = $(top_srcdir)/map
endif


# Configuration 2, "Release"
#
ifeq ($(CFG),Release)
# directories
OBJDIR = $(top_srcdir)/.
DEPDIR = $(top_srcdir)/_deps
# names of programs
ifndef WINE
CC = gcc
CPP = cpp
CXX = g++
RC = windres -O COFF
else
CC = winegcc
CPP = winecpp
CXX = wineg++
RC = wrc
endif
AR = ar
ARFLAGS = -cru
RANLIB = ranlib
DLLWRAP = dllwrap
RM = rm -f
# compiler flags
INCLUDES =
RCINCLUDES =
SYMBOLS =
OPTIMIZE = -O2
WARNINGS = -W -Wall
CPPFLAGS = 
CFLAGS = $(SYMBOLS) $(OPTIMIZE)
ALL_CFLAGS = $(WARNINGS)  $(CFLAGS)
ALL_CXXFLAGS = $(WARNINGS)  $(CFLAGS)
# linker flags
STRIP = -s
LIBDIRS =
LIBS = 
LDFLAGS = $(STRIP) $(MWINDOWS) 
# target
target = $(top_srcdir)/new
endif


OBJECTS = \
	ColourSystem.o \
	main.o \
	map.o \
	mapgen.o \
	ProgInd.o \
	vektor.o \
	view3d.o \
	Wanderer.o


# Explicit rules
#
COMPILE.c = $(CC) $(INCLUDES) $(CPPFLAGS) $(ALL_CFLAGS)
COMPILE.cxx = $(CXX) $(INCLUDES) $(CPPFLAGS) $(ALL_CXXFLAGS)
LINK.c = $(CC) $(CFLAGS) $(LDFLAGS) $(LIBDIRS) $^ -o $@
LINK.cxx = $(CXX) $(CFLAGS) $(LDFLAGS) $(LIBDIRS) $^ -o $@

$(OBJDIR)/%.o : %.c
	$(MAKEDEPEND) > $(DEPDIR)/$*.Po
	$(COMPILE.c) -c $< -o $@

$(OBJDIR)/%.o : %.cpp
	$(MAKEDEPEND) > $(DEPDIR)/$*.Po
	$(COMPILE.cxx) -c $< -o $@

$(OBJDIR)/%.res : %.rc
	$(MAKEDEPEND) > $(DEPDIR)/$*.Pr
	$(RC) $(RCINCLUDES) $(CPPFLAGS) $< $@


# Targets
#
all:	$(target)

debug:
	$(target)

clean:
	$(RM) $(target) $(addprefix $(OBJDIR)/, $(OBJECTS))

$(target): $(addprefix $(OBJDIR)/, $(OBJECTS))
	$(LINK.cxx) $(LIBS)


# Automatic Dependencies
#
-include $(DEPDIR)/ColourSystem.Po
-include $(DEPDIR)/main.Po
-include $(DEPDIR)/map.Po
-include $(DEPDIR)/mapgen.Po
-include $(DEPDIR)/ProgInd.Po
-include $(DEPDIR)/vektor.Po
-include $(DEPDIR)/view3d.Po
-include $(DEPDIR)/Wanderer.Po


