.SUFFIXES: .cc .obj


APPNAME     = Transmission Test Client
ARCH        = WINNT-4.0
SHOBJ       = YES

BINARIES    = $(CDEVLIB)\TestService.lib \
              $(CDEVLIB)\TestService.dll \
	      $(BASEBIN)\TestProgram.exe

include ..\..\include\makeinclude\Makefile.WINNT-4.0

CXXINCLUDES  = /I .\\
CXXEXTRA_DLL = /D "TEST_SERVICE_API=__declspec(dllexport)"
CXXEXTRA_LIB = /D "TEST_SERVICE_API="

!IF "$(SHOBJ)" == "YES"
TARGETS = $(CDEVLIB)\TestService.dll $(BASEBIN)\TestProgram.exe
!ELSE
TARGETS = $(CDEVLIB)\TestService.lib $(BASEBIN)\TestProgram.exe
!ENDIF

targets : $(TARGETS)
		
$(CDEVLIB)\TestService.dll : $(OBJDIR)\TestService.obj
	@echo ^ ^ ^ =^> Linking $(@F) 
	-@if exist $@ erase $@
	-@if not exist $(@D) mkdir $(@D)
	@$(LIB32) $(CDEVLIB)\cdev.lib $(CDEVLIB)\cdevGenericServer.lib\
	$(LINK_DLL_FLAGS) /out:$@ /implib:$(@D)\$(@B).lib $?
	-@copy $@ $(CDEVSHOBJ)\$(CDEVVERSION)\$(@F) > nul
	@echo ^ ^ ^ ^ ^ ^ Done...
	
$(CDEVLIB)\TestService.lib : $(OBJDIR)\TestService.obj
	@echo ^ ^ ^ =^> Linking $(@F) 
	-@if exist $@ erase $@
	-@if not exist $(@D) mkdir $(@D)
	@$(LIB32) $(CDEVLIB)\cdev.lib $(CDEVLIB)\cdevGenericServer.lib\
	$(LINK_LIB_FLAGS) /out:$@ $?
	@echo ^ ^ ^ ^ ^ ^ Done...

$(BASEBIN)\TestProgram.exe : .exec\$(TARGETDIR)\TestProgram.obj 
	-@if exist $@ erase $@
	@echo ^ ^ ^ ^ ^ ^ =^> Linking $(@F)
	$(LINK) $(CDEVLIB)\cdev.lib $(CDEVLIB)\cdevGenericServer.lib\
	$(LINK_EXE_FLAGS) /out:$@ $? 
	@echo ^ ^ ^ ^ ^ ^ ^ ^ ^ Done...
	
