# rcsid : $Id: NTMakefile,v 1.3 2004/06/24 04:08:57 jaltman Exp $

RELDIR=WINNT\install\loopback
!INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME)
!INCLUDE ..\..\..\config\NTMakefile.version

MEDIABINDIR = $(DESTDIR)\WinInstall\Config

EXEFILE = $(MEDIABINDIR)\instloop.exe

DLLFILE = $(MEDIABINDIR)\afsloopback.dll

DLLEXPORTS=\
	-EXPORT:UnInstallLoopBack \
	-EXPORT:IsLoopbackInstalled \
	-EXPORT:InstallLoopBack \
	-EXPORT:doLoopBackEntryW \
	-EXPORT:uninstallLoopBackEntryW \
	-EXPORT:installLoopbackMSI \
	-EXPORT:uninstallLoopbackMSI

DLLLIBFILES=\
	setupapi.lib msi.lib uuid.lib Shell32.lib ole32.lib advapi32.lib wbemuuid.lib

LINK=link

# afsloopback.dll

DLLSOURCEFILES = loopbackutils.cpp renameconnection.cpp wmi.cpp
DLLOBJFILES =  $(OUT)\loopbackutils.obj $(OUT)\renameconnection.obj $(OUT)\wmi.obj

STATICC2OBJ=$(CC) $(cflags) $(afscflags) $(afscdefs) -ML

$(OUT)\loopbackutils.obj: loopbackutils.cpp
	$(STATICC2OBJ) -c -DUNICODE -D_UNICODE /Fo$@ $**

$(OUT)\renameconnection.obj: renameconnection.cpp
	$(STATICC2OBJ) -c -DUNICODE -D_UNICODE /Fo$@ $**

$(OUT)\wmi.obj: wmi.cpp
	$(STATICC2OBJ)  -I$(NTDDKDIR) -c -DUNICODE -D_UNICODE /Fo$@ $**

$(DLLFILE): $(DLLOBJFILES)
	$(LINK) -DLL $(DLLEXPORTS) -OUT:$@ $(DLLOBJFILES) $(DLLLIBFILES)

# instloop.exe

EXEOBJFILES = $(OUT)\instloop.obj $(DLLOBJFILES)
#EXELIBFILES = $(MEDIABINDIR)\afsloopback.lib

$(OUT)\instloop.obj: instloop.c
      $(STATICC2OBJ) -c -DUNICODE -D_UNICODE /Fo$@ $**

$(EXEFILE): $(EXEOBJFILES)
      $(LINK) /OUT:$@ $(EXEOBJFILES) $(DLLLIBFILES)

install:  $(DLLFILE) $(EXEFILE)

clean	::
