#
#  xut - button soccer game
#  Copyright (C) 2008 farrer <farrer@dnteam.org> and gushm <gushm@dnteam.org>
#
#  This file is part of xut.
#
#  xut is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  xut is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with xut.  If not, see <http://www.gnu.org/licenses/>.
#
#

prefix = /usr/local
datadir = ${prefix}/share
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\"

CFLAGS =  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT $(DEFS) -g -c -Wall -O2
CC = g++
EFLAGS =  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
LDFLAGS = 
LIBS = -lvorbisfile -lvorbis -lopenal -logg -lcal3d -lm -lSDL_ttf -lSDL_image -lSDL -lGLU -lGL  -lSDL -lpthread -L$(prefix)/lib/ 

ENDENGINE = ../engine/

BIN = ../bin/

all: dntfont.o guimessage.o guiscore.o guistatus.o initial.o\
     maingui.o optscreen.o selector.o videocontroller.o

dntfont.o: dntfont.cpp dntfont.h
	@printf "Making dntfont.o... "
	@$(CC) $(CFLAGS) dntfont.cpp -o dntfont.o
	@printf "\e[0;32mDone.\e[0;0m\n"

guimessage.o: guimessage.cpp guimessage.h
	@printf "Making guimessage.o... "
	@$(CC) $(CFLAGS) guimessage.cpp -o guimessage.o
	@printf "\e[0;32mDone.\e[0;0m\n"

guiscore.o: guiscore.cpp guiscore.h
	@printf "Making guiscore.o... "
	@$(CC) $(CFLAGS) guiscore.cpp -o guiscore.o
	@printf "\e[0;32mDone.\e[0;0m\n"

guistatus.o: guistatus.cpp guistatus.h
	@printf "Making guistatus.o... "
	@$(CC) $(CFLAGS) guistatus.cpp -o guistatus.o
	@printf "\e[0;32mDone.\e[0;0m\n"

initial.o: initial.cpp initial.h
	@printf "Making initial.o... "
	@$(CC) $(CFLAGS) initial.cpp -o initial.o
	@printf "\e[0;32mDone.\e[0;0m\n"

maingui.o: maingui.cpp maingui.h
	@printf "Making maingui.o... "
	@$(CC) $(CFLAGS) maingui.cpp -o maingui.o
	@printf "\e[0;32mDone.\e[0;0m\n"

optscreen.o: optscreen.cpp optscreen.h
	@printf "Making optscreen.o... "
	@$(CC) $(CFLAGS) optscreen.cpp -o optscreen.o
	@printf "\e[0;32mDone.\e[0;0m\n"

selector.o: selector.cpp selector.h
	@printf "Making selector.o... "
	@$(CC) $(CFLAGS) selector.cpp -o selector.o
	@printf "\e[0;32mDone.\e[0;0m\n"

videocontroller.o: videocontroller.cpp videocontroller.h
	@printf "Making videocontroller.o... "
	@$(CC) $(CFLAGS) videocontroller.cpp -o videocontroller.o
	@printf "\e[0;32mDone.\e[0;0m\n"

clean:
	@printf "Cleaning XUT gui Files..."	
	@\rm -rf *.o *.e
	@printf "\e[0;32mDone.\e[0;0m\n"

