include ..\NMakefile.config

LIBDIR = ..\..\lib\$(TARGETDIR)

OBJS =	$(OBJDIR)\cdev.obj\
	$(OBJDIR)\cdevBlockList.obj\
	$(OBJDIR)\cdevCallback.obj\
	$(OBJDIR)\cdevClock.obj\
	$(OBJDIR)\cdevCollection.obj\
	$(OBJDIR)\cdevCollectionRequest.obj\
	$(OBJDIR)\cdevConfigFinder.obj\
	$(OBJDIR)\cdevData.obj\
	$(OBJDIR)\cdevDataEntry.obj\
	$(OBJDIR)\cdevDefCollectionRequest.obj\
	$(OBJDIR)\cdevDevice.obj\
	$(OBJDIR)\cdevDirRequestObj.obj\
	$(OBJDIR)\cdevDirectory.obj\
	$(OBJDIR)\cdevDirectoryTable.obj\
	$(OBJDIR)\cdevDirectoryTool.obj\
	$(OBJDIR)\cdevErrReqObject.obj\
	$(OBJDIR)\cdevErrSvc.obj\
	$(OBJDIR)\cdevError.obj\
	$(OBJDIR)\cdevErrorCollection.obj\
	$(OBJDIR)\cdevExecGroup.obj\
	$(OBJDIR)\cdevExecObj.obj\
	$(OBJDIR)\cdevFdSet.obj\
	$(OBJDIR)\cdevGlobalTagTable.obj\
	$(OBJDIR)\cdevGroup.obj\
	$(OBJDIR)\cdevGrpCollectionRequest.obj\
	$(OBJDIR)\cdevIOcontext.obj\
	$(OBJDIR)\cdevIntHash.obj\
	$(OBJDIR)\cdevRequestObject.obj\
	$(OBJDIR)\cdevService.obj\
	$(OBJDIR)\cdevSlist.obj\
	$(OBJDIR)\cdevStrHash.obj\
	$(OBJDIR)\cdevSvcFinder.obj\
	$(OBJDIR)\cdevSync.obj\
	$(OBJDIR)\cdevSystem.obj\
	$(OBJDIR)\cdevSystemBase.obj\
	$(OBJDIR)\cdevTagTable.obj\
	$(OBJDIR)\cdevTimeValue.obj\
	$(OBJDIR)\cdevTimerQueue.obj\
	$(OBJDIR)\cdevTranObj.obj\
	$(OBJDIR)\cdevUserFdService.obj\
	$(OBJDIR)\defCallbackCollector.obj\
	$(OBJDIR)\grpCallbackCollector.obj\
	$(OBJDIR)\regerror.obj\
	$(OBJDIR)\regexp.obj\
	$(OBJDIR)\regsub.obj\
	$(OBJDIR)\shObjLoader.obj\
	$(OBJDIR)\xdr.obj\
	$(OBJDIR)\xdr_array.obj\
	$(OBJDIR)\xdr_float.obj\
	$(OBJDIR)\xdr_mem.obj\
	$(OBJDIR)\xdr_rec.obj\
	$(OBJDIR)\xdr_reference.obj\
	$(OBJDIR)\xdr_stdio.obj

!IF "$(SHOBJ)" == "NO"
TARGETS = $(LIBDIR)\cdev.lib
!ELSE
TARGETS = $(LIBDIR)\cdev.dll
!ENDIF

targets : $(TARGETS)

$(LIBDIR)\cdev.lib : $(OBJS)
	@echo =^> Building $(@F) 
	@echo =^> Objects: $(?F)
	-@if exist $@ erase $@
	-@if not exist $(@D) mkdir $(@D)
	@$(LIB32) $(LINK_LIB_FLAGS) /out:$@ $(OBJS)
	@echo ^<= Done...
	
$(LIBDIR)\cdev.dll : $(OBJS)
	@echo =^> Building $(@F) 
	@echo =^> Objects: $(?F)
	-@if exist $@ erase $@
	-@if not exist $(@D) mkdir $(@D)
	@$(LIB32) $(LINK_DLL_FLAGS) /out:$@ /implib:$(@D)\$(@B).lib $(OBJS)
	@echo ^<= Done...
        @echo cdev.dll has been installed in the $(LIBDIR).
        @echo Please add $(LIBDIR) to your path.

