Make the cmd config file parser build on Windows
[openafs.git] / src / cmd / NTMakefile
index 2661949..9033e9b 100644 (file)
@@ -5,41 +5,58 @@
 # License.  For details, see the LICENSE file in the top-level source
 # directory or online at http://www.openafs.org/dl/license10.html
 
+RELDIR=cmd
 !INCLUDE ..\config\NTMakefile.$(SYS_NAME)
 !INCLUDE ..\config\NTMakefile.version
 
-
 # install include files 
 INCFILEDIR = $(DESTDIR)\include\afs 
 
 INCFILES =\
        $(INCFILEDIR)\cmd.h
 
+HEIMDAL = ..\external\heimdal\krb5
+
 
 # build afscmd.lib
 LIBFILE = $(DESTDIR)\lib\afs\afscmd.lib
 
 LIBOBJS =\
-       cmd_errors.obj \
-       cmd.obj \
-       AFS_component_version_number.obj
+       $(OUT)\cmd_errors.obj \
+       $(OUT)\cmd.obj \
+       $(OUT)\AFS_component_version_number.obj
+
+HEIMOBJS =\
+        $(OUT)\config_file.obj \
+       $(OUT)\expand_path.obj
+
+$(LIBOBJS): $$(@B).c
+    $(C2OBJ) $**
+
+$(OUT)\expand_path.obj: $(HEIMDAL)\$$(@B).c
+       $(C2OBJ) -I$(HEIMDAL) -DEXPAND_PATH_HEADER $**
 
-$(LIBFILE): $(LIBOBJS) 
+$(OUT)\config_file.obj: $(HEIMDAL)\$$(@B).c
+        $(C2OBJ) -I$(HEIMDAL) -DKRB5_USE_PATH_TOKENS $**
+
+$(LIBFILE): $(LIBOBJS) $(HEIMOBJS)
        $(LIBARCH) 
 
+$(INCFILES):$$(@F)
+        $(COPY)  $** $(INCFILEDIR)\.
 
 cmd_errors.c cmd.h: cmd_errors.et cmd.p.h
        $(DEL) cmd_errors.c cmd.h
-       $(COMPILE_ET) cmd_errors -h cmd
-
+       $(COMPILE_ET) cmd_errors.et -h cmd
 
-install: $(LIBFILE) $(INCFILES)
-
-install9x: install
+install: cmd.h $(LIBFILE) $(INCFILES)
 
 clean::
-       $(DEL) cmd_errors.c
+       $(DEL) cmd_errors.c cmd.h $(INCFILES)
        $(DEL) $(LIBFILE)
+       $(DEL) *.PDB
 
 test tests:
+
+mkdir: