TBTHOME = /usr/local/games/tbt
INCDIR = -I /usr/include/smpeg -I /usr/include/libxml2 -I /usr/include/SDL/ 
CFLAGS = -O2 -g -fno-strength-reduce -Wall -W -DTBTHOME=\"$(TBTHOME)\" 
LFLAGS = -L. -lm -lSDL -lSDL_net -lSDL_image -lSDL_mixer -ldl -pthread -lxml2 -lsmpeg
CC     = g++
SOURCES = movies.cpp sounds.cpp SFont.cpp Ball.cpp CON_console.cpp CON_consolecommands.cpp CON_internal.cpp Config.cpp Console.cpp DT_drawtext.cpp DialogBox.cpp Dice.cpp Formation.cpp Main.cpp MoviePlayer.cpp NetClient.cpp NetServer.cpp Network.cpp Path.cpp Player.cpp ProgressBar.cpp Public.cpp Screen.cpp Shared.cpp SoundPlayer.cpp Square.cpp State.cpp Team.cpp Transformation.cpp Translator.cpp XmlParser.cpp dir_func.cpp 
OBJS = $(patsubst %.c,%.o,$(SOURCES:%.cpp=%.o))
PRGM = tbt

.SUFFIXES: .cpp .c

.c.o: 
	$(CC) -c $< $(CFLAGS) $(INCDIR) -o $@

.cpp.o: 
	$(CC) -c $< $(CFLAGS) $(INCDIR) -o $@

all: $(PRGM)

$(PRGM): $(OBJS)
	$(CC) $(OBJS) -o $(PRGM) $(LFLAGS)

clean:
	-rm -f $(PRGM) *core *~ *.o

install: 
	-mkdir -p $(TBTHOME)
	-cp -r tbt ../data ../tbt.ico $(TBTHOME)
	-ln -s $(TBTHOME)/tbt /usr/local/bin/tbt

# Dependancies.. Generated by:
# gcc -I /usr/include/smpeg -I /usr/include/libxml2 -I /usr/include/SDL/\
#     -MM *cpp *c
Ball.o: Ball.cpp Ball.h global.h Square.h Dice.h
CON_console.o: CON_console.cpp CON_console.h CON_consolecommands.h DT_drawtext.h CON_internal.h debug.h
CON_consolecommands.o: CON_consolecommands.cpp CON_console.h CON_consolecommands.h CON_internal.h
CON_internal.o: CON_internal.cpp
Config.o: Config.cpp Config.h global.h XmlParser.h Player.h Square.h Dice.h Path.h Shared.h skills.h Team.h Formation.h State.h Public.h Ball.h debug.h
Console.o: Console.cpp Console.h global.h Main.h panel.h skills.h XmlParser.h Player.h Square.h Dice.h Path.h Shared.h Team.h Formation.h State.h Public.h Ball.h Config.h DialogBox.h Translator.h SoundPlayer.h sounds.h Transformation.h ProgressBar.h MoviePlayer.h movies.h dir_func.h Network.h CON_console.h CON_consolecommands.h DT_drawtext.h debug.h
DT_drawtext.o: DT_drawtext.cpp DT_drawtext.h CON_internal.h debug.h
DialogBox.o: DialogBox.cpp DialogBox.h global.h Dice.h Translator.h Config.h XmlParser.h Player.h Square.h Path.h Shared.h skills.h Team.h Formation.h State.h Public.h Ball.h SoundPlayer.h sounds.h SFont.h debug.h
Dice.o: Dice.cpp Dice.h global.h
Formation.o: Formation.cpp Formation.h global.h Square.h
Main.o: Main.cpp Main.h global.h panel.h skills.h XmlParser.h Player.h Square.h Dice.h Path.h Shared.h Team.h Formation.h State.h Public.h Ball.h Config.h DialogBox.h Translator.h SoundPlayer.h sounds.h Transformation.h ProgressBar.h Console.h Network.h CON_console.h CON_consolecommands.h DT_drawtext.h MoviePlayer.h movies.h dir_func.h NetClient.h NetServer.h Screen.h debug.h
MoviePlayer.o: MoviePlayer.cpp MoviePlayer.h global.h movies.h SoundPlayer.h sounds.h Screen.h Config.h XmlParser.h Player.h Square.h Dice.h Path.h Shared.h skills.h Team.h Formation.h State.h Public.h Ball.h Console.h Main.h panel.h DialogBox.h Translator.h Transformation.h ProgressBar.h dir_func.h Network.h CON_console.h CON_consolecommands.h DT_drawtext.h NetClient.h NetServer.h debug.h
NetClient.o: NetClient.cpp NetClient.h Network.h global.h
NetServer.o: NetServer.cpp NetServer.h Network.h global.h
Network.o: Network.cpp Network.h global.h
Path.o: Path.cpp Path.h global.h Square.h
Player.o: Player.cpp Player.h global.h Square.h Dice.h Path.h Shared.h skills.h debug.h
ProgressBar.o: ProgressBar.cpp ProgressBar.h global.h DT_drawtext.h Config.h XmlParser.h Player.h Square.h Dice.h Path.h Shared.h skills.h Team.h Formation.h State.h Public.h Ball.h debug.h
Public.o: Public.cpp Public.h global.h Team.h Player.h Square.h Dice.h Path.h Shared.h skills.h Formation.h debug.h
Screen.o: Screen.cpp Screen.h global.h Config.h XmlParser.h Player.h Square.h Dice.h Path.h Shared.h skills.h Team.h Formation.h State.h Public.h Ball.h Console.h Main.h panel.h DialogBox.h Translator.h SoundPlayer.h sounds.h Transformation.h ProgressBar.h MoviePlayer.h movies.h dir_func.h Network.h CON_console.h CON_consolecommands.h DT_drawtext.h NetClient.h NetServer.h debug.h
Shared.o: Shared.cpp Shared.h global.h
SoundPlayer.o: SoundPlayer.cpp SoundPlayer.h global.h sounds.h
Square.o: Square.cpp Square.h global.h
State.o: State.cpp State.h global.h Square.h Player.h Dice.h Path.h Shared.h skills.h Team.h Formation.h Public.h Ball.h debug.h
Team.o: Team.cpp Team.h global.h Player.h Square.h Dice.h Path.h Shared.h skills.h Formation.h debug.h
Transformation.o: Transformation.cpp Transformation.h debug.h
Translator.o: Translator.cpp Translator.h global.h
XmlParser.o: XmlParser.cpp XmlParser.h global.h Player.h Square.h Dice.h Path.h Shared.h skills.h Team.h Formation.h State.h Public.h Ball.h Config.h debug.h
dir_func.o: dir_func.cpp dir_func.h global.h XmlParser.h Player.h debug.h Square.h Dice.h Path.h Shared.h skills.h Team.h Formation.h State.h Public.h Ball.h Config.h
#mmgr.o: mmgr.cpp mmgr.h nommgr.h
movies.o: movies.cpp movies.h
sounds.o: sounds.cpp sounds.h
SFont.o: SFont.cpp SFont.h global.h debug.h
