ARCH        = OS
SHOBJ       = YES

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

APPNAME     = "Reflector Client/Server Example"
CXXINCLUDES = -I./
SO_SRCS     = ReflectorService.cc
SO_LIBS     = -L$(CDEVLIB) -lcdevGenericServer $(OSLIBS)
LIBS        = -L$(CDEVLIB) -lcdevGenericServer $(CDEVLIBS) $(ACELIBS) $(OSLIBS)

ifeq ($(SHOBJ), YES)
    TARGETS = $(BASELIB)/ReflectorService.so $(BASEBIN)/ReflectorServer
else
    TARGETS = $(BASELIB)/libReflectorService.a $(BASEBIN)/ReflectorServer
endif

targets : $(TARGETS)

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

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