ntmakefile-fix-20031207
[openafs.git] / src / tbutc / NTMakefile
index 15afcf4..f8bd979 100644 (file)
@@ -7,6 +7,7 @@
 
 AFSDEV_AUXCDEFINES = -DAFS_PTHREAD_ENV -DRXDEBUG
 
+RELDIR=tbutc
 !INCLUDE ..\config\NTMakefile.$(SYS_NAME)
 !INCLUDE ..\config\NTMakefile.version
 
@@ -30,23 +31,41 @@ BUTC    =..\butc
 BUCOORD = ..\bucoord
 VOLSER  = ..\volser
 
-BUCOORDOBJS = ubik_db_if.obj $(BUCOORD)\volstub.obj $(BUCOORD)\dlq.obj \
-                            $(BUCOORD)\status.obj $(BUCOORD)\bucoord_errs.obj
-
-VOLSERLIBOBJ = $(VOLSER)\volint.cs.obj  vsprocs.obj              $(VOLSER)\vsutils.obj \
-               $(VOLSER)\lockprocs.obj  $(VOLSER)\volint.xdr.obj $(VOLSER)\volerr.obj  \
-               $(VOLSER)\volint.ss.obj  AFS_component_version_number.obj 
-VOLSERLIBS  = afstvolser.lib
-
-LWPOBJS     = lock.obj
-
-BUTMOBJS    = file_tm.obj AFS_component_version_number.obj
-BUTMLIBS    = afstbutm.lib
+BUCOORDOBJS = $(OUT)\ubik_db_if.obj \
+    $(OUT)\$(BUCOORD)\volstub.obj \
+    $(OUT)\$(BUCOORD)\dlq.obj \
+       $(OUT)\$(BUCOORD)\status.obj \
+    $(OUT)\$(BUCOORD)\bucoord_errs.obj
+
+VOLSERLIBOBJ = $(OUT)\$(VOLSER)\volint.cs.obj  \
+               $(OUT)\vsprocs.obj \
+               $(OUT)\$(VOLSER)\vsutils.obj \
+               $(OUT)\$(VOLSER)\lockprocs.obj  \
+               $(OUT)\$(VOLSER)\volint.xdr.obj \
+               $(OUT)\$(VOLSER)\volerr.obj  \
+               $(OUT)\$(VOLSER)\volint.ss.obj  \
+               $(OUT)\AFS_component_version_number.obj 
+VOLSERLIBS  = $(OUT)\afstvolser.lib
+
+LWPOBJS     = $(OUT)\lock.obj
+
+BUTMOBJS    = $(OUT)\file_tm.obj \
+              $(OUT)\AFS_component_version_number.obj
+BUTMLIBS    = $(OUT)\afstbutm.lib
 BUTMINCLUDE = -I$(DESTDIR)\include
 
-BUTCOBJS   = dbentries.obj tcprocs.obj lwps.obj tcmain.obj list.obj recoverDb.obj \
-            tcudbprocs.obj dump.obj tcstatus.obj butc_xbsa.obj \
-             $(LWPOBJS) $(BUCOORDOBJS)
+BUTCOBJS   = $(OUT)\dbentries.obj \
+         $(OUT)\tcprocs.obj \
+         $(OUT)\lwps.obj \
+         $(OUT)\tcmain.obj \
+         $(OUT)\list.obj \
+         $(OUT)\recoverDb.obj \
+            $(OUT)\tcudbprocs.obj \
+         $(OUT)\dump.obj \
+         $(OUT)\tcstatus.obj \
+         $(OUT)\butc_xbsa.obj \
+         $(LWPOBJS) \
+         $(BUCOORDOBJS)
 BUTCINCLUDE= -I. -I$(DESTDIR)\include -I$(XBSADIR)
 BUTCLIBS=$(DESTDIR)\lib\afs\afsbudb.lib  \
             $(DESTDIR)\lib\afs\afsbubasics.lib \
@@ -56,12 +75,10 @@ BUTCLIBS=$(DESTDIR)\lib\afs\afsbudb.lib  \
             $(DESTDIR)\lib\afs\afskauth.lib \
             $(DESTDIR)\lib\afsubik.lib \
             $(DESTDIR)\lib\afs\afsauth.lib \
-\
             $(DESTDIR)\lib\afsrpc.lib \
              $(DESTDIR)\lib\afsrxkad.lib \
             $(DESTDIR)\lib\afsrx.lib \
              $(DESTDIR)\lib\afslwp.lib \
-\
              $(DESTDIR)\lib\afs\afsutil.lib \
              $(DESTDIR)\lib\afs\afsusd.lib \
             $(DESTDIR)\lib\afs\afspioctl.lib \
@@ -71,11 +88,13 @@ BUTCLIBS=$(DESTDIR)\lib\afs\afsbudb.lib  \
             $(DESTDIR)\lib\afs\afsprocmgmt.lib \
              $(DESTDIR)\lib\afs\afseventlog.lib \
 !IF (("$(SYS_NAME)"=="i386_win95" ) || ("$(SYS_NAME)"=="I386_WIN95" ))
-       $(DESTDIR)\lib\win95\pthread.lib \
+       $(DESTDIR)\lib\win95\afspthread.lib \
 !ELSE
-       $(DESTDIR)\lib\pthread.lib \
+       $(DESTDIR)\lib\afspthread.lib \
 !ENDIF
-            $(DESTDIR)\lib\afsdes.lib
+            $(DESTDIR)\lib\afsdes.lib \
+            $(DESTDIR)\lib\cm_dns.obj
+
 
 #      $(DESTDIR)\lib\afsauthent.lib \
 #      $(DESTDIR)\lib\afsrpc.lib \
@@ -87,9 +106,7 @@ BUTCLIBS=$(DESTDIR)\lib\afs\afsbudb.lib  \
 #      $(DESTDIR)\lib\afs\afseventlog.lib \
 #      $(DESTDIR)\lib\pthread.lib
 
-include ..\config\NTMakefile.version
-
-# rm tcstatus.obj
+# rm $(OUT)\tcstatus.obj
 # nmake /nologo /f ntmakefile install
 #----------------------------------------------- BUTC
 
@@ -97,66 +114,65 @@ $(BUTCEXE): $(BUTCOBJS) $(BUTCLIBS)
        $(EXECONLINK)
        $(EXEPREP)
 
-#      $(C2OBJ) $**
+.c.$(OUT)\obj:
+       $(C2OBJ) -I$(BUCOORD) $<
 
-dbentries.obj: $(BUTC)/dbentries.c
+$(OUT)\dbentries.obj: $(BUTC)/dbentries.c
        $(C2OBJ) $**
 
-tcprocs.obj: $(BUTC)/tcprocs.c
+$(OUT)\tcprocs.obj: $(BUTC)/tcprocs.c
        $(C2OBJ) $**
 
-lwps.obj: $(BUTC)/lwps.c
+$(OUT)\lwps.obj: $(BUTC)/lwps.c
        $(C2OBJ) $**
 
-tcmain.obj: $(BUTC)/tcmain.c
+$(OUT)\tcmain.obj: $(BUTC)/tcmain.c
        $(C2OBJ) $**
 
-list.obj: $(BUTC)/list.c
+$(OUT)\list.obj: $(BUTC)/list.c
        $(C2OBJ) $**
 
-recoverDb.obj: $(BUTC)/recoverDb.c
+$(OUT)\recoverDb.obj: $(BUTC)/recoverDb.c
        $(C2OBJ) $**
 
-tcudbprocs.obj: $(BUTC)/tcudbprocs.c
+$(OUT)\tcudbprocs.obj: $(BUTC)/tcudbprocs.c
        $(C2OBJ) $**
 
-dump.obj: $(BUTC)/dump.c
+$(OUT)\dump.obj: $(BUTC)/dump.c
        $(C2OBJ) $**
 
-tcstatus.obj: $(BUTC)/tcstatus.c
+$(OUT)\tcstatus.obj: $(BUTC)/tcstatus.c
        $(C2OBJ) $**
 
-butc_xbsa.obj: $(BUTC)/butc_xbsa.c
+$(OUT)\butc_xbsa.obj: $(BUTC)/butc_xbsa.c
        $(C2OBJ) $**
 
 #----------------------------------------------- BUCOORD
 
-ubik_db_if.obj: $(BUCOORD)/ubik_db_if.c
-       $(C2OBJ) $**
+$(OUT)\ubik_db_if.obj: $(BUCOORD)/ubik_db_if.c
+       $(C2OBJ) -I$(BUCOORD) $**
 
 #----------------------------------------------- VOLSER
 # Build the afstvolser.lib library here. The file compiled
 # for is is vsprocs.c. The rest are from the VOLSER dir.
 
-afstvolser.lib: $(VOLSERLIBOBJ)
+$(OUT)\afstvolser.lib: $(VOLSERLIBOBJ)
        $(LIBARCH)
 
-vsprocs.obj: $(VOLSER)/vsprocs.c
+$(OUT)\vsprocs.obj: $(VOLSER)/vsprocs.c
        $(C2OBJ) $**
 
 #----------------------------------------------- LWP
 
-lock.obj: $(LWP)/lock.c
+$(OUT)\lock.obj: $(LWP)/lock.c
        $(C2OBJ) $**
 
 #----------------------------------------------- BUTC
 
-file_tm.obj: $(BUTM)/file_tm.c
-
-file_tm.obj: $(BUTM)/file_tm.c
+$(OUT)\file_tm.obj: $(BUTM)/file_tm.c
        $(C2OBJ) $**
 
-afstbutm.lib: $(BUTMOBJS)
+$(OUT)\afstbutm.lib: $(BUTMOBJS)
        $(LIBARCH)
 
 #-----------------------------------------------
@@ -166,3 +182,6 @@ all: $(BUTCEXE) $(BUTMLIBS)
 install: all
 
 noversion: install
+
+mkdir:
+