
prefix =	@prefix@
exec_prefix =	@exec_prefix@
datadir =	@datadir@
bindir =	@bindir@

OBJF =		cacredits.o \
		cadialog.o \
		cagoody.o \
		caimageview.o \
		caimageselector.o \
		caimagehueselector.o \
		caimagemanipulation.o \
		cainfodialog.o \
		calabel.o \
		calineedit.o \
		caloadingscreen.o \
		camath.o \
		camenu.o \
		camenuinput.o \
		camenuitem.o \
		camenulabel.o \
		camenuselect.o \
		capanel.o \
		caplayer.o \
		caplayersettingsdialog.o \
		caplayerview.o \
		capositiontable.o \
		capositiontableview.o \
		caresources.o \
		cascreen.o \
		casignupscreen.o \
		caslotselectiondialog.o \
		casoundeffect.o \
		castringlist.o \
		catrophy.o \
		cawidget.o
#DATAFILES =     resources.dat
EXTERN_LIBS =   -lclanCore -lclanSound -lclanDisplay -lclanApp -lHermes

all: trophy $(DATAFILES)

clean:
	@echo "Cleaning project..."
	find . -name '*.o' -exec rm "{}" \;
	if [ -f race ]; then rm -f race; fi

distclean: clean
	rm -Rf config.log config.cache Makefile config.status trophy resources.dat doc

trophy: $(OBJF)
	@echo "Building executable..."
	$(CXX) $(EXTERN_LIBS) -o trophy $(OBJF)

%.o : %.cpp
	$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -O3 -Wall -DPKGDATADIR=\"$(datadir)/trophy\" $< -o $@

%.dat : %.scr trophy
	./trophy -datafile $< $@

doc :
	@echo "Building documentation"
	doxygen doxy.cfg
