# Makefile for network/samples
# Satofumi KAMIMURA
# $Id: Makefile 919 2009-05-22 07:43:39Z satofumi $

# Compile options
CC = g++
CXXFLAGS = -g -O0 -Wall -Werror $(INCLUDES) `sdl-config --cflags`
INCLUDES = -I.. -I../../connection/sdl -I../../connection -I../../system -I../../gui -I../../geometry -I../../lua -I../../common
LDFLAGS =
LDLIBS = `sdl-config --libs` -lSDL_image -lSDL_net -lSDL_ttf -lGL -llua -lluabind -lboost_signals

# Target
TARGET = \
	chat_server chat_client \

all : $(TARGET)

clean :
	$(RM) *.o $(TARGET) error_log.txt

depend :
	makedepend -Y -- $(INCLUDES) -- $(wildcard *.h *.cpp)

.PHONY : all clean depend
######################################################################
REQUIRE_LIBS = ../../lua/lua.a ../../lua/lua_luabind.a ../network.a ../../gui/gui.a ../../connection/sdl/connection_sdl.a ../../system/system.a ../../system/sdl/system_sdl.a

$(REQUIRE_LIBS) :
	cd $(@D)/ && $(MAKE) $(@F)

$(TARGET) : $(REQUIRE_LIBS)
# DO NOT DELETE

chat_client.o: port.h ../PacketUtils.h ../Packet.h
chat_client.o: ../../connection/Connection.h ../ChatPacketUtils.h
chat_client.o: ../../connection/sdl/TcpipCtrl.h ../../gui/Screen.h
chat_client.o: ../../geometry/Rect.h ../../gui/LayerManager.h
chat_client.o: ../../gui/LayerInterface.h ../../geometry/Point.h
chat_client.o: ../../gui/Layer.h ../../gui/TextInput.h ../../gui/Event.h
chat_client.o: ../../gui/CallbackEvent.h ../../gui/EventUtils.h
chat_client.o: ../../lua/luabindGeometry.h ../../lua/luabindGui.h
chat_client.o: ../../lua/LuaHandler.h ../../system/delay.h
chat_server.o: ../../connection/sdl/TcpipAccepter.h
chat_server.o: ../../connection/sdl/TcpipCtrl.h ../../connection/Connection.h
chat_server.o: ../PacketBuffer.h ../Packet.h ../PacketUtils.h port.h
chat_server.o: ../../system/delay.h
