update-version-number-for-windows-20031129
[openafs.git] / src / config / NTMakefile.i386_nt40
index a423448..f9e3930 100644 (file)
@@ -53,8 +53,32 @@ AFSDEV_BUILDTYPE = NONE
 !UNDEF _CRTDBG_MAP_ALLOC
 !ENDIF
 
+# Limit default include and library directories to those specified for build.
+
+!IFNDEF AFSDEV_INCLUDE
+!ERROR Must define AFSDEV_INCLUDE to be the default include directories.
+!ENDIF
+
+!IF ((!DEFINED(INCLUDE)) && ([set INCLUDE=$(AFSDEV_INCLUDE)] != 0))
+#    If env. var. INCLUDE not defined then macro assignment won't set it.
+!ERROR Failed setting environment variable INCLUDE.
+!ENDIF
+INCLUDE = $(AFSDEV_INCLUDE)
+
+
+!IFNDEF AFSDEV_LIB
+!ERROR Must define AFSDEV_LIB to be the default library directories.
+!ENDIF
+
+!IF ((!DEFINED(LIB)) && ([set LIB=$(AFSDEV_LIB)] != 0))
+#    If env. var. LIB not defined then macro assignment won't set it.
+!ERROR Failed setting environment variable LIB.
+!ENDIF
+LIB = $(AFSDEV_LIB)
+
 #define used in WinNT/2000 installation and program version display
-AFSPRODUCT_VERSION=1.2.8 a
+AFSPRODUCT_VERSION=1.3.51
+AFSPRODUCT_FILE_VERSION=1,3,5100,0
 CELLNAME_DEFAULT=Your Cell Name
 CELLSERVDB_INSTALL=CellServDB.GrandCentral
 CELLSERVDB_WEB=http://grand.central.org/dl/cellservdb/CellServDB
@@ -68,11 +92,11 @@ OBJ=obj
 !IF ("$(AFS_OBJDIR)"=="") 
 #########  AFS_OBJDIR is NOT used use default locations
 !  IF ("$(AFSDEV_BUILDTYPE)" == "CHECKED")
-DESTDIR=$(AFSROOT)\$(OBJ)\$(DEST)\checked
-OJT=$(MAKEDIR:src=obj\checked)
+DESTDIR=$(AFSROOT)\$(DEST)\checked
+OJT=$(AFSROOT)\$(OBJ)\checked
 !  ELSE
-DESTDIR=$(AFSROOT)\$(OBJ)\$(DEST)\free
-OJT=$(MAKEDIR:src=obj\free)
+DESTDIR=$(AFSROOT)\$(DEST)\free
+OJT=$(AFSROOT)\$(OBJ)\free
 !  ENDIF
 UTIL_CR = $(DESTDIR)\bin\util_cr.exe
 !ELSE
@@ -117,14 +141,23 @@ UTIL_CR = $(DESTDIR)\bin\util_cr.exe
 !  ENDIF
 !ENDIF #AFS_OBJDIR
 
-!MESSAGE Directory assignments: OJT=[$(OJT)] DESTDIR=[$(DESTDIR)]
+!IF ("$(RELDIR)"=="")
+OUT=$(OJT)
+!ELSE
+OUT=$(OJT)\$(RELDIR)
+!ENDIF
+
+!MESSAGE Directory assignments: 
+!MESSAGE     OJT=[$(OJT)]
+!MESSAGE     OUT=[$(OUT)] 
+!MESSAGE DESTDIR=[$(DESTDIR)]
 
 # Definitions provided here are based on WIN32.MAK, a common nmake
 # file included with the MS SDK and MS VC distributions.
 # WIN32.MAK, and this nmake file, are targeted to the MSVC compiler;
 # port this nmake file if additional compiler support is required.
 
-!IF ("$(AFSVER)"=="1300")
+!IF ("$(AFSVER_CL)"=="1300")
 afslflags = $(afslflags) /DEBUG
 !ENDIF
 
@@ -132,7 +165,7 @@ afslflags = $(afslflags) /DEBUG
 APPVER=4.0
 !ENDIF
 
-!UNDEF NODEBUG
+
 
 !INCLUDE <WIN32.MAK>
 
@@ -154,8 +187,8 @@ MIDL  = midl
 
 # Common clean target.
 clean::
-       $(DEL) /q $(OJT)\*.obj $(OJT)\*.lib $(OJT)\*.dll $(OJT)\*.exe $(OJT)\*.pdb
-       $(DEL) /q $(OJT)\*_component_version_number.* *_component_version_number.*
+       $(DEL) /q $(OUT)\*.obj $(OUT)\*.lib $(OUT)\*.dll $(OUT)\*.exe $(OUT)\*.pdb
+       $(DEL) /q $(OUT)\*_component_version_number.* *_component_version_number.*
 
 # Common lang target.
 lang::
@@ -171,8 +204,10 @@ afscdefs =\
        -DWIN32_LEAN_AND_MEAN \
        -DSTRICT \
        -D_WIN32_IE=0x0400 \
+       -D_WIN32_WINNT=0x0400 \
      -DAFS_AFSDB_ENV \
      -DAFS_FREELANCE_CLIENT \
+     -DAFS_64BIT_ENV \
         $(AFSDEV_AUXCDEFINES)
 
 
@@ -205,6 +240,7 @@ cdebug = $(cdebug) -Zi
 afscflags = $(afscflags) /Ox
 cdebug = $(cdebug:-Od=) # avoid annoying override warning (D4025)
 cvarsdll = $(cvarsdll:-MDd=-MD)
+NODEBUG=1
 
 !ELSE          # CHECKED BUILD
 
@@ -216,6 +252,7 @@ afscdefs = $(afscdefs) -DDEBUG
 afscflags = $(afscflags) -D_DEBUG -D_CRTDBG_MAP_ALLOC
 !ENDIF
 
+!UNDEF NODEBUG
 !ENDIF
 
 # Set compiler warning level
@@ -238,18 +275,21 @@ afscflags = $(afscflags) /W$(AFSDEV_WARNLEVEL)
 C2OBJ   = $(cc) /Fo$@ /Fd$*.pdb $(cflags) $(cdebug) $(cvarsdll) $(afscflags) $(afscdefs) /c  
 CPP2OBJ = $(C2OBJ)
 # Inference rules for building and installing targets
-# Compile .c files, from current directory to defined by OJT
+# Compile .c files, from current directory to defined by OUT
 
 .SUFFIXES: .c .rc 
 
-.c{$(OJT)\}.obj:
+.c{$(OUT)\}.obj:
        $(C2OBJ) $<
+   
+.c.obj:
+   $(C2OBJ) $<
 
-.cpp{$(OJT)\}.obj:
+.cpp{$(OUT)\}.obj:
        $(CPP2OBJ) $<
 
-.rc{$(OJT)\}.res:
-       $(RC) /fo$(OJT)\$(<B).res $<
+.rc{$(OUT)\}.res:
+       $(RC) /fo$(OUT)\$(<B).res $<
 
 # Compile .rc (resource) files
 #.rc.res:
@@ -314,16 +354,21 @@ ldebug = /NODEFAULTLIB:LIBC
 #ldebug = $(ldebug) -debugtype:cv 
 #!ENDIF
 
+# Disable optimization; generate full debug info in obj.
+afscflags = $(afscflags) /Od /Zi
+
 !IFDEF VADUMP
+!IF ("AFSVER_CL"=="1200")
 ldebug = $(ldebug) -debugtype:both
 ldebug = $(ldebug:-debugtype:cv=)
 !ENDIF
+!ENDIF
 
 !IFNDEF _CRTDBG_MAP_ALLOC
 mfclflags = $(mfclflags) /NODEFAULTLIB:msvcrtd.lib
 mfcdlllflags = $(mfcdlllflags) /NODEFAULTLIB:msvcrtd.lib
-#v6.0 doesn't work using msvcrtd.lib unless _CRTDBG_MAP_ALLOC is defined, v7.0 requires it
 
+#v6.0 doesn't work using msvcrtd.lib unless _CRTDBG_MAP_ALLOC is defined, v7.0 requires it
 !IF ("$(AFSVER_CL)"=="1200")
 EXEMFCLINK=$(EXEMFCLINK:/NODEFAULTLIB:msvcrtd.lib=)
 DLLMFCLINK=$(DLLMFCLINK:/NODEFAULTLIB:msvcrtd.lib=)