# 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

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

############################################################################
# Definitions for building a DLL.

DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\afsserver.cpl

DLLOBJS =\
	$(OUT)\cpl_interface.obj \
	$(OUT)\AFS_component_version_number.obj \
	$(OUT)\afssvrcpa_stub.res 

DLLLIBS =\
	$(DESTDIR)\lib\afs\afsreg.lib \
	$(DESTDIR)\lib\afs\TaLocale.lib \
	comctl32.lib

DEFFILE = afssvrcpa.def

$(DLLFILE): $(DLLOBJS)
	$(DLLGUILINK)  $(DLLLIBS) /DEF:$(DEFFILE)
	$(DLLPREP)


############################################################################
# Definitions for generating versioninfo resource via RC

$(OUT)\afssvrcpa_stub.res: afssvrcpa_stub.rc AFS_component_version_number.h

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

install: $(DLLFILE) lang


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

lang::
	$(CD) lang
	for /f %l in ('dir /B ??_??') do @$(NTLANG) %l $(MAKECMD) /nologo /e /f NTMakefile install
	$(CD) ..


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

clean::
	$(CD) lang
        @if exist AFS_component_version_number.h del AFS_component_version_number.h
	for /f %l in ('dir /B ??_??') do ( if exist @$(NTLANG) do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean )
	$(CD) ..

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

