From c387f6bad22f3e3cb2025e5165c767694c540860 Mon Sep 17 00:00:00 2001
From: Rene Brun <Rene.Brun@cern.ch>
Date: Fri, 31 Jan 2003 13:09:17 +0000
Subject: [PATCH] Some mods by Matt Langston optimizing the make clean setup
 and adding support to install under MS .NET environment

git-svn-id: http://root.cern.ch/svn/root/trunk@6031 27541ba8-7e3a-0410-8455-c3a389f83636
---
 Makefile                 | 2 +-
 cint/Module.mk           | 2 +-
 config/Makefile.win32    | 2 +-
 config/Makefile.win32gdk | 2 +-
 configure                | 6 +++---
 main/Module.mk           | 8 +++++++-
 utils/Module.mk          | 2 +-
 7 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 4af3e1a4218..3e514a4a1bd 100644
--- a/Makefile
+++ b/Makefile
@@ -395,7 +395,7 @@ distclean:: clean
 	-@mv -f include/config.h include/config.hh
 	@rm -f include/*.h $(MAKEINFO) $(CORELIB)
 	-@mv -f include/config.hh include/config.h
-	@rm -f build/dummy.d bin/*.dll lib/*.def lib/*.exp lib/*.lib .def
+	@rm -f build/dummy.d bin/*.dll bin/*.exp bin/*.lib lib/*.def lib/*.exp lib/*.lib .def
 	-@mv -f tutorials/galaxy.pal.root tutorials/galaxy.pal.roott
 	-@mv -f tutorials/galaxy.root tutorials/galaxy.roott
 	@rm -f tutorials/*.root tutorials/*.ps tutorials/*.gif so_locations
diff --git a/cint/Module.mk b/cint/Module.mk
index 08cebcf7905..df3485bd5ce 100644
--- a/cint/Module.mk
+++ b/cint/Module.mk
@@ -204,7 +204,7 @@ clean::         clean-cint
 
 distclean-cint: clean-cint
 		@rm -f $(CINTALLDEP) $(CINTLIB) $(IOSENUM) $(CINTEXEDEP) \
-		   $(CINT) $(CINTTMP) $(MAKECINT)
+		   $(CINT) $(CINTTMP) $(MAKECINT) $(CINTDIRM)/*.exp $(CINTDIRM)/*.lib
 
 distclean::     distclean-cint
 
diff --git a/config/Makefile.win32 b/config/Makefile.win32
index 0a1b58f5460..c48976404dc 100644
--- a/config/Makefile.win32
+++ b/config/Makefile.win32
@@ -44,7 +44,7 @@ SOEXT         = dll
 EXEEXT        = .exe
 
 # System libraries:
-SYSLIBS       =
+SYSLIBS       = advapi32.lib
 XLIBS         =
 CILIBS        =
 CRYPTLIBS     =
diff --git a/config/Makefile.win32gdk b/config/Makefile.win32gdk
index e9277576720..381105ddc77 100644
--- a/config/Makefile.win32gdk
+++ b/config/Makefile.win32gdk
@@ -46,7 +46,7 @@ SOEXT         = dll
 EXEEXT        = .exe
 
 # System libraries:
-SYSLIBS       =
+SYSLIBS       = advapi32.lib
 XLIBS         =
 CILIBS        =
 CRYPTLIBS     =
diff --git a/configure b/configure
index 6d3fb6ed780..d087e5ac175 100755
--- a/configure
+++ b/configure
@@ -876,7 +876,7 @@ fi
 # Check for libshift.a
 #
 if test ! "x$enable_rfio" = "xno" ; then
-    check_library "libshift shift" "$enable_shared" "$shiftlibdir" \
+    check_library "libshift shiftmd shift" "$enable_shared" "$shiftlibdir" \
 	$RFIO $RFIO/lib /cern/pro/lib /cern/new/lib /cern/old/lib \
 	/opt/shift/lib /usr/local/shift/lib /usr/lib/shift \
 	/usr/local/lib/shift /usr/lib /usr/local/lib
@@ -907,12 +907,12 @@ if test ! "x$enable_cern" = "xno"; then
 	/opt/cern/new/lib /opt/cern/old/lib /usr/local/cern/pro/lib \
 	/usr/local/cern/new/lib /usr/local/cern/old/lib /usr/lib \
 	/usr/lib/cern /usr/local/lib /usr/local/lib/cern"
-    check_library "libpacklib packlib" "$enable_shared" "${cernlibdir}" \
+    check_library "libpacklib packmd packlib" "$enable_shared" "${cernlibdir}" \
 	$cernlibdirs
     packlib=$found_lib
     packlibdir=$found_dir
 
-    check_library "libkernlib kernlib" "$enable_shared" "${cernlibdir}" \
+    check_library "libkernlib kernmd kernlib" "$enable_shared" "${cernlibdir}" \
 	$cernlibdirs
     kernlib=$found_lib
     kernlibdir=$found_dir
diff --git a/main/Module.mk b/main/Module.mk
index f7b6d948733..44ee2fe8a31 100644
--- a/main/Module.mk
+++ b/main/Module.mk
@@ -37,7 +37,13 @@ HADD         := bin/hadd$(EXEEXT)
 ##### h2root #####
 H2ROOTS1     := $(MODDIRS)/h2root.cxx
 H2ROOTS2     := $(HBOOKS2)
-H2ROOTS3     := $(wildcard $(MAINDIRW)/*.c)
+# 2003.01.29
+# Matthew D. Langston  <langston@SLAC.Stanford.EDU>
+#
+# Symbols in cfopei.obj is already provided in packmd.lib,
+#
+#H2ROOTS3    := $(wildcard $(MAINDIRW)/*.c)
+H2ROOTS3     := $(filter-out $(MAINDIRW)/cfopei.c, $(wildcard $(MAINDIRW)/*.c))
 H2ROOTS4     := $(MAINDIRW)/tzvers.f
 H2ROOTO      := $(H2ROOTS1:.cxx=.o) $(H2ROOTS2:.f=.o)
 ifeq ($(PLATFORM),win32)
diff --git a/utils/Module.mk b/utils/Module.mk
index 5c7d98a6017..22484f3318c 100644
--- a/utils/Module.mk
+++ b/utils/Module.mk
@@ -41,6 +41,6 @@ clean-utils:
 clean::         clean-utils
 
 distclean-utils: clean-utils
-		@rm -f $(ROOTCINTDEP) $(ROOTCINTTMP) $(ROOTCINT)
+		@rm -f $(ROOTCINTDEP) $(ROOTCINTTMP) $(ROOTCINT) $(UTILSDIRS)/*.exp $(UTILSDIRS)/*.lib
 
 distclean::     distclean-utils
-- 
GitLab