#
#  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: collision.o forceio.o physic.o

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

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

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


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

