#*********************************
#	TuxBuZZ 0.0.2b bY DoC#include
#		(darthfeio@lycos.com)
#*********************************

CC=gcc
#para tirar o debug do servidor, use esse CFLAG e comente o outro
#CFLAGS=-O2
CFLAGS=-DTUXBUZZ_DEBUG -O2

TARGET=LINUX
#TARGET=FREEBSD


#compila o programa cliente

tclient: client.o commands.o tserver
	$(CC) -o tclient client.o commands.o

client.o: client.c client.h
	$(CC) -c client.c $(CFLAGS) -D$(TARGET)

commands.o: commands.c commands.h messages.h tuxbuzzpackage.h
	$(CC) -c commands.c $(CFLAGS) -D$(TARGET)


#compila o servidor

tserver: server.o requests.o zombiekiller.o
	$(CC) -o tserver server.o requests.o zombiekiller.o

server.o: server.c server.h messages.h tuxbuzzpackage.h
	$(CC) -c server.c $(CFLAGS) -D$(TARGET)

requests.o: requests.c requests.h messages.h tuxbuzzpackage.h
	$(CC) -c requests.c $(CFLAGS) -D$(TARGET)

zombiekiller.o: zombiekiller.c zombiekiller.h
	$(CC) -c zombiekiller.c $(CFLAGS) -D$(TARGET)
clean:
	rm tserver tclient *.o

 	