#
#  RPG makefile
#
#   run "make" to compile the RPG and RPG Edit
#   run "make remake" to recompile everything
#   run "make clean" to clean up the object files
#

CC = g++
CPPFLAGS = -Wall -O3


default: install_exes
remake: clean default

clean:
	del *.o

install_exes: ..//RPGEdit.exe


..//RPG.exe : RPG.o DRS.o Errors.o tiledmap.o GUI.o MIDI.o Engine.o Script.o
	$(CC) $(CPPFLAGS) -o ..//RPG.exe RPG.o DRS.o Errors.o tiledmap.o GUI.o MIDI.o Engine.o Script.o -lalleg

..//RPGEdit.exe : RPGEdit.o DRS.o Errors.o tiledmap.o GUI.o OOGUI.o Editor.o EditTiles.o EditObjects.o
	$(CC) $(CPPFLAGS) -o ..//RPGEdit.exe RPGEdit.o DRS.o Errors.o tiledmap.o GUI.o OOGUI.o Editor.o EditTiles.o EditObjects.o -lalleg


RPGEdit.o     : RPGEdit.cpp DRS.h Errors.h tiledmap.h GUI.h OOGUI.h Editor.h

RPG.o         : RPG.cpp DRS.h Errors.h tiledmap.h GUI.h MIDI.h Engine.h Script.h

tiledmap.o    : tiledmap.cpp tiledmap.h

DRS.o         : DRS.cpp DRS.h

GUI.o         : GUI.cpp DRS.h GUI.h

OOGUI.o       : OOGUI.cpp OOGUI.h

Editor.o      : Editor.cpp Errors.h DRS.h tiledmap.h GUI.h Editor.h

EditTiles.o   : EditTiles.cpp tiledmap.h

EditObjects.o : EditObjects.cpp

Engine.o      : Engine.cpp Engine.h DRS.h GUI.h Errors.h tiledmap.h RPG.h

MIDI.o        : MIDI.cpp Errors.h MIDI.h

Errors.o      : Errors.cpp Errors.h

Script.o      : Script.cpp Script.h