ARCH        = OS
SHOBJ       = YES

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

APPNAME     = "Transmission Test Client"
CXXINCLUDES = -I./

# ******************************************************************************
# * The BINARIES definition names all of the binary files that should be deleted
# * whenever "make clean" is executed.
# ******************************************************************************
BINARIES    = $(BASELIB)/libTestService.a \
              $(BASELIB)/TestService.so \
              $(BASEBIN)/TestProgram

ifeq ($(SHOBJ), YES)
        LIBS    = -L$(CDEVLIB) -lcdevGenericServer $(CDEVLIBS) $(OSLIBS)
	TARGETS = $(BASELIB)/TestService.so $(BASEBIN)/TestProgram
else
        LIBS    = -L$(CDEVLIB) -lcdevGenericServer $(CDEVLIBS) $(OSLIBS)
	TARGETS = $(BASELIB)/libTestService.a $(BASEBIN)/TestProgram
endif

targets : $(TARGETS)
		
$(BASELIB)/TestService.so : $(OBJDIR)/TestService.o
	$(LINK.so) -o $@ $^ -L$(CDEVLIB) -lcdevGenericServer $(NETLIBS)
	@mkdir -p $(CDEVSHOBJ)/$(CDEVVERSION)
	@cp $@ $(CDEVSHOBJ)/$(CDEVVERSION)/$(@F)
	
$(BASELIB)/libTestService.a : $(OBJDIR)/TestService.o 
	$(LINK.a) $@ $^
	@$(RANLIB) $@ > /dev/null

$(BASEBIN)/TestProgram : $(OBJDIR)/TestProgram.o 
	$(LINK.cc) $^ -o $@ $(LIBS) 
