ARCH        = OS
SHOBJ       = YES

include $(CDEV)/extensions/cdevGenericServer/include/makeinclude/Makefile.$(ARCH)

APPNAME     = "CDEV/ACE Script Service"
CXXINCLUDES = -I./
BASEBIN     = ./
SO_LIBS     = $(OSLIBS)
SO_SRCS     = ScriptService.cc \
	      ScriptRequestObject.cc \
	      ScriptList.cc
OBJS        = $(OBJDIR)/ScriptService.o \
	      $(OBJDIR)/ScriptRequestObject.o \
	      $(OBJDIR)/ScriptList.o

# ******************************************************************************
# * The BINARIES definition names all of the binary files that should be deleted
# * whenever "make clean" is executed.
# ******************************************************************************
BINARIES    = $(CDEVLIB)/libScriptService.a \
              $(CDEVSHOBJ)/$(CDEVVERSION)/ScriptService.so 

ifeq ($(SHOBJ), YES)
        LIBS    = $(CDEVLIBS) $(OSLIBS)
	TARGETS = $(CDEVSHOBJ)/$(CDEVVERSION)/ScriptService.so 
else
        LIBS    = $(CDEVLIBS) -lScriptService $(OSLIBS)
	TARGETS = $(CDEVLIB)/libScriptService.a 
endif

targets : $(TARGETS)
		
$(CDEVSHOBJ)/$(CDEVVERSION)/ScriptService.so : $(OBJS)
	@rm -f $@
	@$(SOBUILD)
	@mkdir -p $(CDEVSHOBJ)/$(CDEVVERSION)
	@echo "<= Done...\n"
	
$(CDEVLIB)/libScriptService.a : $(OBJS)
	@rm -f $@
	@echo "=> Building archive library $(@F)"
	@echo "   => Linking $(@F) from objects"
	@$(LINK.a) $@ $^
	@$(RANLIB) $@ > /dev/null
	@echo "<= Done...\n"
