#IDLOUT = ../../SMACidl/idlout
#CC = g++
#SMACFRM = ../../SMACFramework
#CFLAGS = -I$(IDLOUT) -I$(SMACFRM) -I/usr/local/include -I/usr/local/include/omniNotify -I/usr/local/include/COS
#CFLAGS += -D__OMNIORB4__ -fexceptions -Wall -Wno-unused -Werror -D__linux__ -D__OSVERSION__=2
#CFLAGS += -g -O0
#CFLAGS += -g
CFLAGS = $(CFLAGS1)
#LINK = g++
#LFLAGS = -lLqrSMACFramework -lLqrSMACInterfaces -lboost_serialization-mt -lboost_thread-mt -lCOS4 -lomniORB4 -lCOSDynamic4 -lomniCodeSets4 -lomniConnectionMgmt4 -lomniDynamic4 -lomnithread
#LFLAGS = -lLqrSMACFramework -lLqrSMACInterfaces -lboost_serialization-mt -lboost_thread-mt -lCOS4 -lomniORB4 -lCOSDynamic4 -lomniDynamic4 -lomnithread
LFLAGS = $(LFLAGS2)
MAKEFILE = Makefile
OBJ = ./obj
TESTCLIENT = TestClient
SHARED_LIBS = /usr/local/lib/libLqrSMAC*

OBJECTS = \
$(OBJ)/TestClient.o \
$(OBJ)/TestClientProgram.o

all : dirs $(TESTCLIENT)

dirs :	
	if [ ! -d obj ]; then mkdir obj ; fi
	
$(TESTCLIENT) : $(OBJECTS) $(MAKEFILE) $(SHARED_LIBS)
	$(LINK) $(OBJECTS) $(LFLAGS) -o $(TESTCLIENT)

clean :
	rm -f $(TESTCLIENT) $(OBJECTS)

rebuild : clean all

INCLUDES_H = $(SMACFRM)/includes.h

$(OBJ)/TestClient.o : TestClient.cpp TestClientProgram.h $(INCLUDES_H) $(MAKEFILE) $(SHARED_LIBS)
	$(CC) -c $(CFLAGS) -c $< -o $@

$(OBJ)/TestClientProgram.o : TestClientProgram.cpp TestClientProgram.h $(SMACFRM)/LqrSMACProgram.h $(INCLUDES_H) $(MAKEFILE) $(SHARED_LIBS)
	$(CC) -c $(CFLAGS) -c $< -o $@
