TCAMCPP = \
   DieWithError.c AcceptTCPConnection.c CreateTCPServerSocket.c newcamd-client.cpp des.cpp TCPEchoServer-Thread.c 

TCAM = \
   DieWithError.o AcceptTCPConnection.o CreateTCPServerSocket.o newcamd-client.o des.o TCPEchoServer-Thread.o
    
P_CXX="/home/billy/e2/mipsel-unknown-linux-gnu/bin/mipsel-unknown-linux-gnu-g++"
P_CPP="/home/billy/e2/mipsel-unknown-linux-gnu/bin/mipsel-unknown-linux-gnu-c++"
P_CXXFLAGS="-I/home/e2/mipsel-unknown-linux-gnu/mipsel-unknown-linux-gnu/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -fpermissive"
P_LDFLAGS="-L/home/e2/mipsel-unknown-linux-gnu/mipsel-unknown-linux-gnu/lib -Wl,-rpath-link,/home/e2/mipsel-unknown-linux-gnu/mipsel-unknown-linux-gnu/lib -Wl,-O1"

all: $(TCAMCPP)
	$(P_CXX) -c $(TCAMCPP)  $(P_CXXFLAGS) 

x86:
	g++ -o btksrv_x86 $(TCAMCPP) -lpthread -lcrypt

ppc: $(TCAM)
	$(P_CXX) -o btksrv_mips $(P_CXXFLAGS) $(P_LDFLAGS)  $(TCAM) -lpthread -lcrypt
	
