ARCH        = OS
SHOBJ       = YES

include ../../include/makeinclude/Makefile.$(ARCH)

APPNAME     = "Performance Client/Server Test"
CXXINCLUDES = -I./ -DMANUAL=TRUE
SO_SRCS     = PerformanceService.cc
SO_LIBS     = -L$(CDEVLIB) -lcdevGenericServer $(OSLIBS)
LIBS        = -L$(CDEVLIB) -lcdevGenericServer $(CDEVLIBS) $(OSLIBS)

ifeq ($(SHOBJ), YES)
    TARGETS = $(BASELIB)/PerformanceService.so $(BASEBIN)/PerformanceServer $(BASEBIN)/PerformanceTest $(BASEBIN)/PerformanceTest2
else
    TARGETS = $(BASELIB)/libPerformanceService.a $(BASEBIN)/PerformanceServer $(BASEBIN)/PerformanceTest $(BASEBIN)/PerformanceTest2
endif

targets : $(TARGETS)

$(BASEBIN)/PerformanceTest : $(OBJDIR)/PerformanceTest.o 
	$(LINK.cc) $^ $(LIBS) -o $@
	
$(BASEBIN)/PerformanceTest2 : $(OBJDIR)/PerformanceTest2.o 
	$(LINK.cc) $^ $(LIBS) -o $@
	
$(BASEBIN)/PerformanceServer : $(OBJDIR)/PerformanceServer.o 
	$(LINK.cc) $^ $(LIBS) -o $@
	
$(BASELIB)/PerformanceService.so : $(OBJDIR)/PerformanceService.o 
	$(LINK.so) -o $@ $^ -L$(CDEVLIB) -lcdevGenericServer $(OSLIBS)
	@mkdir -p $(CDEVSHOBJ)/$(CDEVVERSION)
	@cp $@ $(CDEVSHOBJ)/$(CDEVVERSION)/$(@F)
		

$(BASELIB)/libPerformanceService.a : $(OBJDIR)/PerformanceService.o 
	$(LINK.a) $@ $(OBJDIR)/PerformanceService.o
	@$(RANLIB) $@ > /dev/null
	
