# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
#
# This software has been released under the terms of the IBM Public
# License.  For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html

AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -I$(DESTDIR)\include\afs -I$(DESTDIR)\include\rx \
        /D"_WINDOWS" /D"_WINDLL" /D"_AFXDLL" /D"_USRDLL" -DUNICODE -D_UNICODE

NO_CRTDBG=1			#define this to disable any CRT_DBG flag
RELDIR=WINNT\client_exp
!INCLUDE ..\..\config\NTMakefile.$(SYS_NAME)
!include ..\..\config\NTMakefile.version

ETC = $(DESTDIR)\root.client\usr\vice\etc

############################################################################
# afs_shl_ext.dll


DLLFILE = $(ETC)\afs_shl_ext.dll

ICONS =\
        $(ETC)\link.ico \
        $(ETC)\mount.ico

DLLOBJS =\
	$(OUT)\add_acl_entry_dlg.obj \
	$(OUT)\add_submount_dlg.obj \
	$(OUT)\afs_shl_ext.obj \
	$(OUT)\afs_shl_ext_stub.res \
	$(OUT)\auth_dlg.obj \
	$(OUT)\clear_acl_dlg.obj \
        $(OUT)\cm_nls.obj \
	$(OUT)\copy_acl_dlg.obj \
	$(OUT)\down_servers_dlg.obj \
        $(OUT)\fs_acl.obj \
	$(OUT)\fs_utils.obj \
	$(OUT)\gui2fs.obj \
	$(OUT)\help.obj \
	$(OUT)\klog_dlg.obj \
	$(OUT)\make_mount_point_dlg.obj \
	$(OUT)\mount_points_dlg.obj \
	$(OUT)\msgs.obj \
	$(OUT)\partition_info_dlg.obj \
	$(OUT)\results_dlg.obj \
	$(OUT)\server_status_dlg.obj \
	$(OUT)\set_afs_acl.obj \
	$(OUT)\shell_ext.obj \
	$(OUT)\stdafx.obj \
	$(OUT)\submount_info.obj \
	$(OUT)\submounts_dlg.obj \
	$(OUT)\unlog_dlg.obj \
	$(OUT)\volumeinfo.obj \
	$(OUT)\make_symbolic_link_dlg.obj \
        $(OUT)\symlinks_dlg.obj \
        $(OUT)\propbase.obj \
        $(OUT)\propfile.obj \
        $(OUT)\propacl.obj \
        $(OUT)\propvolume.obj \
	$(OUT)\AFS_component_version_number.obj

AFSD = ..\afsd

$(OUT)\fs_acl.obj: $(AFSD)\fs_acl.c
	$(C2OBJ) -UUNICODE -U_UNICODE $**

$(OUT)\fs_utils.obj: $(AFSD)\fs_utils.c
	$(C2OBJ) -UUNICODE -U_UNICODE $**

$(OUT)\cm_nls.obj: $(AFSD)\cm_nls.c
	$(C2OBJ)  -UUNICODE -U_UNICODE $**

DLLSDKLIBS =\
    mpr.lib

DLLLIBS =\
        $(DESTDIR)\lib\afs\afsauth.lib \
	$(DESTDIR)\lib\afsrpc.lib \
	$(DESTDIR)\lib\afsauthent.lib \
	$(DESTDIR)\lib\libosi.lib \
        $(DESTDIR)\lib\afs\afsreg.lib  \
	$(DESTDIR)\lib\afs\TaLocaleU.lib \
	$(DESTDIR)\lib\afs\mtafsutil.lib \
        $(DESTDIR)\lib\afsroken.lib \
	$(DESTDIR)\lib\opr.lib \
        $(DESTDIR)\lib\libafsconf.lib

$(DLLFILE): $(DLLOBJS) $(DLLLIBS)
	$(DLLCONLINK) /DEF:afs_shl_ext.def $(DLLSDKLIBS)
        $(_VC_MANIFEST_EMBED_DLL)
	$(DLLPREP)
        $(CODESIGN_USERLAND)
        $(SYMSTORE_IMPORT)

############################################################################
# Install Icon files

$(ETC)\mount.ico: mount.ico
        $(COPY) $** $@

$(ETC)\link.ico: link.ico
        $(COPY) $** $@

############################################################################
# Definitions for generating versioninfo resources

$(OUT)\afs_shl_ext_stub.res: AFS_component_version_number.h

############################################################################
# Install target; primary makefile target

install: $(DLLFILE) $(ICONS) lang

############################################################################
# Language target

lang:: en_US ja_JP ko_KR zh_TW zh_CN pt_BR es_ES de_DE

en_US:
	$(CD) lang
	$(NTLANG) $@ $(MAKECMD) /nologo /f NTMakefile install
    $(CD) ..

ja_JP:
	$(CD) lang
	@$(NTLANG) $@ $(MAKECMD) /nologo /f NTMakefile install
    $(CD) ..

ko_KR:
	$(CD) lang
	@$(NTLANG) $@ $(MAKECMD) /nologo /f NTMakefile install
    $(CD) ..

zh_CN:
	$(CD) lang
	@$(NTLANG) $@ $(MAKECMD) /nologo /f NTMakefile install
    $(CD) ..

zh_TW:
	$(CD) lang
	@$(NTLANG) $@ $(MAKECMD) /nologo /f NTMakefile install
    $(CD) ..

pt_BR:
	$(CD) lang
	@$(NTLANG) $@ $(MAKECMD) /nologo /f NTMakefile install
    $(CD) ..

es_ES:
	$(CD) lang
	@$(NTLANG) $@ $(MAKECMD) /nologo /f NTMakefile install
    $(CD) ..

de_DE:
	$(CD) lang
	@$(NTLANG) $@ $(MAKECMD) /nologo /f NTMakefile install
    $(CD) ..


############################################################################
# Local clean target; augments predefined clean target

clean::
	$(DEL) *.pdb
	$(CD) lang
	$(DEL) AFS_component_version_number.h
	if exist $(NTLANG) $(NTLANG) en_US $(MAKECMD) /nologo /f NTMakefile clean
	if exist $(NTLANG) $(NTLANG) ja_JP $(MAKECMD) /nologo /f NTMakefile clean
	if exist $(NTLANG) $(NTLANG) ko_KR $(MAKECMD) /nologo /f NTMakefile clean
	if exist $(NTLANG) $(NTLANG) zh_CN $(MAKECMD) /nologo /f NTMakefile clean
	if exist $(NTLANG) $(NTLANG) zh_TW $(MAKECMD) /nologo /f NTMakefile clean
	if exist $(NTLANG) $(NTLANG) pt_BR $(MAKECMD) /nologo /f NTMakefile clean
	if exist $(NTLANG) $(NTLANG) es_ES $(MAKECMD) /nologo /f NTMakefile clean
	if exist $(NTLANG) $(NTLANG) de_DE $(MAKECMD) /nologo /f NTMakefile clean
    $(CD) ..

mkdir:
	-mkdir $(OUT)\lang
	cd lang
	nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir
	cd ..
