Windows: build tubik
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 12 Aug 2010 15:11:25 +0000 (11:11 -0400)
committerDerrick Brashear <shadow@dementia.org>
Fri, 19 Nov 2010 12:46:02 +0000 (04:46 -0800)
Build the pthreaded ubik library on Windows

Change-Id: Id6112ef95b60a5f786fa60473ca8ae1a9a3b5201
Reviewed-on: http://gerrit.openafs.org/3326
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/tubik/NTMakefile [new file with mode: 0644]
src/tubik/udebug.rc [new file with mode: 0644]

diff --git a/src/tubik/NTMakefile b/src/tubik/NTMakefile
new file mode 100644 (file)
index 0000000..c7d11ff
--- /dev/null
@@ -0,0 +1,103 @@
+# 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=tubik
+!INCLUDE ..\config\NTMakefile.$(SYS_NAME)
+!INCLUDE ..\config\NTMakefile.version
+AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -DAFS_PTHREAD_ENV
+
+SRC_DIR = ..\ubik
+
+############################################################################
+# Install header files
+
+INCFILEDIR = $(DESTDIR)\include
+
+INCFILES =\
+       $(INCFILEDIR)\ubik.h \
+       $(INCFILEDIR)\ubik_int.h
+
+install_headers: $(INCFILES)
+
+############################################################################
+# build mtafsubik.lib
+
+MT_LIBFILE = $(DESTDIR)\lib\afs\mtafsubik.lib
+
+MT_LIBOBJS =\
+       $(OUT)\disk.obj \
+       $(OUT)\remote.obj \
+       $(OUT)\beacon.obj \
+       $(OUT)\recovery.obj \
+       $(OUT)\ubik.obj \
+       $(OUT)\uinit.obj \
+       $(OUT)\vote.obj \
+       $(OUT)\lock.obj \
+       $(OUT)\phys.obj \
+       $(OUT)\ubik_int.cs.obj \
+       $(OUT)\ubik_int.ss.obj \
+       $(OUT)\ubik_int.xdr.obj \
+       $(OUT)\ubikcmd.obj \
+       $(OUT)\ubikclient.obj \
+       $(OUT)\uerrors.obj      \
+       $(OUT)\AFS_component_version_number.obj
+
+$(MT_LIBOBJS): $(SRC_DIR)\$$(@B).c
+        $(C2OBJ) -I$(SRC_DIR) $**
+
+$(MT_LIBFILE): $(MT_LIBOBJS)
+       $(LIBARCH)
+
+############################################################################
+# Definitions for building a EXE.
+
+RS_UDBG_EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\udebug.exe
+CL_UDBG_EXEFILE = $(DESTDIR)\bin\udebug.exe
+
+UDBG_EXEOBJS =\
+       $(OUT)\udebug.obj
+
+UDBG_EXERES =\
+       $(OUT)\udebug.res
+
+$(UDBG_EXEOBJS): $(SRC_DIR)\$$(@B).c
+        $(C2OBJ) -I$(SRC_DIR) $**
+
+UDBG_EXELIBS =\
+       $(DESTDIR)\lib\afs\mtafsubik.lib \
+       $(DESTDIR)\lib\afs\afsreg.lib \
+       $(DESTDIR)\lib\afsrpc.lib \
+       $(DESTDIR)\lib\afs\afscom_err.lib \
+       $(DESTDIR)\lib\afs\afscmd.lib \
+       $(DESTDIR)\lib\afs\mtafsutil.lib
+
+$(RS_UDBG_EXEFILE): $(UDBG_EXEOBJS) $(UDBG_EXERES) $(UDBG_EXELIBS)
+       $(EXECONLINK) iphlpapi.lib shell32.lib
+        $(_VC_MANIFEST_EMBED_EXE)
+       $(EXEPREP)
+        $(CODESIGN_USERLAND)
+        $(SYMSTORE_IMPORT)
+
+$(CL_UDBG_EXEFILE): $(RS_UDBG_EXEFILE)
+       $(COPY) $** $@
+
+############################################################################
+# generate versioninfo resources
+
+$(OUT)\udebug.res: AFS_component_version_number.h
+#      $(RC) $*.rc
+
+############################################################################
+# Install target; primary makefile target
+
+install: $(MT_LIBFILE) $(CL_UDBG_EXEFILE)
+
+clean::
+        -$(DEL) $(MT_LIBFILE)
+        -$(DEL) $(CL_UDBG_EXEFILE)
+
+mkdir:
diff --git a/src/tubik/udebug.rc b/src/tubik/udebug.rc
new file mode 100644 (file)
index 0000000..9438ff1
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * 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
+ */
+
+/* Define VERSIONINFO resource */
+
+#define  AFS_VERINFO_FILE_DESCRIPTION "AFS Ubik Diagnostic Command (Threaded)"
+#define  AFS_VERINFO_NAME "udebug"
+#define  AFS_VERINFO_FILENAME "udebug.exe"
+
+#include "AFS_component_version_number.h"
+#include "..\config\NTVersioninfo.rc"