ARCH=OS
include ../cdevGenericServer/include/makeinclude/Makefile.$(ARCH)

APPNAME        = "CDEV Simple Generic Service"
BASEDIR        = $(shell pwd)
INCDIR         = $(CDEV)/extensions/cdevGenericServer/include
BINDIR         = ./
LIBDIR         = $(CDEV)/lib/$(TARGETDIR)

CDEV_INCLUDES  = -I$(CDEV)/include
CDEV_LIBS      = -lcdev
CDEV_LIBDIR    = $(CDEV)/lib/$(TARGETDIR)

CLASS_INCLUDES = -I./ -I$(INCDIR)

CXXEXTRA       = -g $(CDEV_INCLUDES) $(CLASS_INCLUDES)

ARLIB_OBJ      = .obj/$(TARGETDIR)/cdevSimpleRequestObject.o \
		 .obj/$(TARGETDIR)/cdevSimpleService.o \
		 .obj/$(TARGETDIR)/cdevTranNode.o 

SHLIB_OBJ      = .shobj/$(TARGETDIR)/cdevSimpleRequestObject.o \
		 .shobj/$(TARGETDIR)/cdevSimpleService.o \
		 .shobj/$(TARGETDIR)/cdevTranNode.o  

TARGETS = $(LIBDIR)/libSimpleService.a $(LIBDIR)/libSimpleService.sl

targets : $(TARGETS)

$(LIBDIR)/libSimpleService.a : $(ARLIB_OBJ)
	@rm -f $@
	@echo "=> ar ruv $@"
	@mkdir -p $(LIBDIR)
	@$(LINK.a) $@ $(ARLIB_OBJ)
	@ranlib $@ > /dev/null
	@echo "\n       -------- Completed ----------\n"
	
$(LIBDIR)/libSimpleService.sl : $(SHLIB_OBJ)
	@rm -f $@
	@echo "=> $(LINK.so) $(@F)"
	@mkdir -p $(LIBDIR)
	@$(LINK.so) -o $@ $(SHLIB_OBJ)
	@echo "\n       -------- Completed ----------\n"
