default:
	make wget
	make bot2
	make bot3
	make bot
	make www-robot

all:
	make clean
	make wget
	make bot2
	make bot3
	make bot
	make www-robot

bot2:
	c++ -O2 -Wall -std=c++98 thread.cpp bot2.cpp -o bot2
	strip ./bot2

dbm:
	rm -f ./test_dbm
	c++ -O2 test_dbm.cpp -o test_dbm -lgdbm -lgdbm_compat
	strip ./test_dbm

clean:
	rm -f ./www-robot
	rm -f ./*.o
	rm -f ./robot.dat
	rm -f ./bot
	rm -f ./*.core
	rm -f ./bot2
	rm -f ./bot3
	rm -f ./wget

wget:
	c++ -O2 -Wall -std=c++98 tcp_stream.cpp -c
	c++ -O2 -Wall -std=c++98 tcp_stream.o wget.cpp -o wget
	strip ./wget

www-robot:
	c++ -g thread.cpp www-robot.cpp -o ./www-robot -lpthread

bot:bot.cpp
	c++ -O2 -Wall -std=c++98 tcp_stream.cpp bot.cpp -o ./bot
	strip ./bot

bot3:bot3.cpp
	c++ -g -Wall -std=c++98 thread.cpp tcp_stream.cpp bot3.cpp -o ./bot3 -lpthread
	
