Commit 9c2ddd44 authored by Lynn Garren's avatar Lynn Garren
Browse files

use lib instead of ar when building Visual C++ libraries

parent 38dce551
......@@ -39,6 +39,14 @@ AC_ARG_ENABLE(static,
*) build_static="yes";;
esac],
[build_static="yes"])
AC_ARG_ENABLE(visual,
AC_HELP_STRING([--enable-visual],[on by default when using Visual C++]),
[case "${enableval}" in
yes) build_visual="yes";;
no) build_visual="no";;
*) build_visual="no";;
esac],
[build_visual="no"])
AC_ARG_ENABLE(gmake,
AC_HELP_STRING([--enable-gmake],[use gmake (default is make)]),
......@@ -215,7 +223,11 @@ c++)
cl)
AM_CXXFLAGS="-EHsc -nologo -GR -GX -MD"
AR="ar"; ARFLAGS="cru"
build_shared="no"
MY_SHFLAGS=" "; MY_SHLINK="lib /NOLOGO"; SHEXT=lib
MY_SHNAME="/OUT:"; MY_LD=" "
build_static="no"
build_shared="yes"
build_visual="yes"
;;
CC)
case "$target" in
......@@ -256,6 +268,7 @@ esac
AM_CONDITIONAL(BUILD_SHARED, test x$build_shared = xyes)
AM_CONDITIONAL(BUILD_STATIC, test x$build_static = xyes)
AM_CONDITIONAL(BUILD_VISUAL, test x$build_visual = xyes)
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_LDFLAGS)
......
......@@ -30,11 +30,19 @@ all-local: $(shareddir) $(lib_shared)
$(shareddir):
test -d $(shareddir) || mkdir $(shareddir)
if BUILD_VISUAL
$(lib_shared): $(libCLHEP_Cast_@VERSION@_so_OBJECTS)
$(SHLINK) $(SHNAME)$@ $(libCLHEP_Cast_@VERSION@_so_OBJECTS)
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) /c /Fo$@ $<
else
$(lib_shared): $(libCLHEP_Cast_@VERSION@_so_OBJECTS)
$(CXXLINK) $(SHLINK) $(SHNAME)$@ $(libCLHEP_Cast_@VERSION@_so_OBJECTS) -o $@
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) -c -o $@ $<
endif
install-exec-local: $(lib_shared)
@$(NORMAL_INSTALL)
......
......@@ -39,6 +39,14 @@ AC_ARG_ENABLE(static,
*) build_static="yes";;
esac],
[build_static="yes"])
AC_ARG_ENABLE(visual,
AC_HELP_STRING([--enable-visual],[on by default when using Visual C++]),
[case "${enableval}" in
yes) build_visual="yes";;
no) build_visual="no";;
*) build_visual="no";;
esac],
[build_visual="no"])
AC_ARG_ENABLE(gmake,
AC_HELP_STRING([--enable-gmake],[use gmake (default is make)]),
......@@ -217,7 +225,11 @@ c++)
cl)
AM_CXXFLAGS="-EHsc -nologo -GR -GX -MD"
AR="ar"; ARFLAGS="cru"
build_shared="no"
MY_SHFLAGS=" "; MY_SHLINK="lib /NOLOGO"; SHEXT=lib
MY_SHNAME="/OUT:"; MY_LD=" "
build_static="no"
build_shared="yes"
build_visual="yes"
;;
CC)
case "$target" in
......@@ -258,6 +270,7 @@ esac
AM_CONDITIONAL(BUILD_SHARED, test x$build_shared = xyes)
AM_CONDITIONAL(BUILD_STATIC, test x$build_static = xyes)
AM_CONDITIONAL(BUILD_VISUAL, test x$build_visual = xyes)
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_LDFLAGS)
......
......@@ -32,11 +32,19 @@ all-local: $(shareddir) $(lib_shared)
$(shareddir):
test -d $(shareddir) || mkdir $(shareddir)
if BUILD_VISUAL
$(lib_shared): $(libCLHEP_Evaluator_@VERSION@_so_OBJECTS)
$(SHLINK) $(SHNAME)$@ $(libCLHEP_Evaluator_@VERSION@_so_OBJECTS)
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) /c /Fo$@ $<
else
$(lib_shared): $(libCLHEP_Evaluator_@VERSION@_so_OBJECTS)
$(CXXLINK) $(SHLINK) $(SHNAME)$@ $(libCLHEP_Evaluator_@VERSION@_so_OBJECTS) -o $@
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) -c -o $@ $<
endif
install-exec-local: $(lib_shared)
@$(NORMAL_INSTALL)
......
......@@ -8,8 +8,11 @@ INCLUDES = -I$(top_builddir)/
# libraries to link, and whence
if BUILD_STATIC
LDADD = $(top_builddir)/src/libCLHEP-@PACKAGE@-@VERSION@.a
else
if BUILD_VISUAL
else
LIBS += $(MY_LD)$(top_builddir)/src
endif
LDADD = $(top_builddir)/src/libCLHEP-@PACKAGE@-@VERSION@.$(SHEXT)
endif
......
......@@ -39,6 +39,14 @@ AC_ARG_ENABLE(static,
*) build_static="yes";;
esac],
[build_static="yes"])
AC_ARG_ENABLE(visual,
AC_HELP_STRING([--enable-visual],[on by default when using Visual C++]),
[case "${enableval}" in
yes) build_visual="yes";;
no) build_visual="no";;
*) build_visual="no";;
esac],
[build_visual="no"])
AC_ARG_ENABLE(gmake,
AC_HELP_STRING([--enable-gmake],[use gmake (default is make)]),
......@@ -225,7 +233,11 @@ c++)
cl)
AM_CXXFLAGS="-EHsc -nologo -GR -GX -MD"
AR="ar"; ARFLAGS="cru"
build_shared="no"
MY_SHFLAGS=" "; MY_SHLINK="lib /NOLOGO"; SHEXT=lib
MY_SHNAME="/OUT:"; MY_LD=" "
build_static="no"
build_shared="yes"
build_visual="yes"
;;
CC)
case "$target" in
......@@ -266,6 +278,7 @@ esac
AM_CONDITIONAL(BUILD_SHARED, test x$build_shared = xyes)
AM_CONDITIONAL(BUILD_STATIC, test x$build_static = xyes)
AM_CONDITIONAL(BUILD_VISUAL, test x$build_visual = xyes)
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_LDFLAGS)
......
......@@ -36,11 +36,19 @@ all-local: $(shareddir) $(lib_shared)
$(shareddir):
test -d $(shareddir) || mkdir $(shareddir)
if BUILD_VISUAL
$(lib_shared): $(libCLHEP_Exceptions_@VERSION@_so_OBJECTS)
$(SHLINK) $(SHNAME)$@ $(libCLHEP_Exceptions_@VERSION@_so_OBJECTS)
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) /c /Fo$@ $<
else
$(lib_shared): $(libCLHEP_Exceptions_@VERSION@_so_OBJECTS)
$(CXXLINK) $(SHLINK) $(SHNAME)$@ $(libCLHEP_Exceptions_@VERSION@_so_OBJECTS) -o $@
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) -c -o $@ $<
endif
install-exec-local: $(lib_shared)
@$(NORMAL_INSTALL)
......
......@@ -10,10 +10,13 @@ if BUILD_STATIC
LDADD = $(top_builddir)/src/libCLHEP-@PACKAGE@-@VERSION@.a \
${top_builddir}/../Cast/src/libCLHEP-Cast-@VERSION@.a \
${top_builddir}/../RefCount/src/libCLHEP-RefCount-@VERSION@.a
else
if BUILD_VISUAL
else
LIBS += $(MY_LD)$(top_builddir)/src \
$(MY_LD)${top_builddir}/../Cast/src \
$(MY_LD)${top_builddir}/../RefCount/src
endif
LDADD = $(top_builddir)/src/libCLHEP-@PACKAGE@-@VERSION@.$(SHEXT) \
${top_builddir}/../Cast/src/libCLHEP-Cast-@VERSION@.$(SHEXT) \
${top_builddir}/../RefCount/src/libCLHEP-RefCount-@VERSION@.$(SHEXT)
......
......@@ -39,6 +39,14 @@ AC_ARG_ENABLE(static,
*) build_static="yes";;
esac],
[build_static="yes"])
AC_ARG_ENABLE(visual,
AC_HELP_STRING([--enable-visual],[on by default when using Visual C++]),
[case "${enableval}" in
yes) build_visual="yes";;
no) build_visual="no";;
*) build_visual="no";;
esac],
[build_visual="no"])
AC_ARG_ENABLE(gmake,
AC_HELP_STRING([--enable-gmake],[use gmake (default is make)]),
......@@ -229,7 +237,11 @@ c++)
cl)
AM_CXXFLAGS="-EHsc -nologo -GR -GX -MD"
AR="ar"; ARFLAGS="cru"
build_shared="no"
MY_SHFLAGS=" "; MY_SHLINK="lib /NOLOGO"; SHEXT=lib
MY_SHNAME="/OUT:"; MY_LD=" "
build_static="no"
build_shared="yes"
build_visual="yes"
;;
CC)
case "$target" in
......@@ -270,6 +282,7 @@ esac
AM_CONDITIONAL(BUILD_SHARED, test x$build_shared = xyes)
AM_CONDITIONAL(BUILD_STATIC, test x$build_static = xyes)
AM_CONDITIONAL(BUILD_VISUAL, test x$build_visual = xyes)
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_LDFLAGS)
......
......@@ -100,11 +100,19 @@ all-local: $(shareddir) $(lib_shared)
$(shareddir):
test -d $(shareddir) || mkdir $(shareddir)
if BUILD_VISUAL
$(lib_shared): $(libCLHEP_GenericFunctions_@VERSION@_so_OBJECTS)
$(SHLINK) $(SHNAME)$@ $(libCLHEP_GenericFunctions_@VERSION@_so_OBJECTS)
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) /c /Fo$@ $<
else
$(lib_shared): $(libCLHEP_GenericFunctions_@VERSION@_so_OBJECTS)
$(CXXLINK) $(SHLINK) $(SHNAME)$@ $(libCLHEP_GenericFunctions_@VERSION@_so_OBJECTS) -o $@
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) -c -o $@ $<
endif
install-exec-local: $(lib_shared)
@$(NORMAL_INSTALL)
......
......@@ -8,8 +8,11 @@ INCLUDES = -I$(top_builddir)/
# libraries to link, and whence
if BUILD_STATIC
LDADD = $(top_builddir)/src/libCLHEP-@PACKAGE@-@VERSION@.a
else
if BUILD_VISUAL
else
LIBS += $(MY_LD)$(top_builddir)/src
endif
LDADD = $(top_builddir)/src/libCLHEP-@PACKAGE@-@VERSION@.$(SHEXT)
endif
......
......@@ -39,6 +39,14 @@ AC_ARG_ENABLE(static,
*) build_static="yes";;
esac],
[build_static="yes"])
AC_ARG_ENABLE(visual,
AC_HELP_STRING([--enable-visual],[on by default when using Visual C++]),
[case "${enableval}" in
yes) build_visual="yes";;
no) build_visual="no";;
*) build_visual="no";;
esac],
[build_visual="no"])
AC_ARG_ENABLE(gmake,
AC_HELP_STRING([--enable-gmake],[use gmake (default is make)]),
......@@ -218,7 +226,11 @@ c++)
cl)
AM_CXXFLAGS="-EHsc -nologo -GR -GX -MD"
AR="ar"; ARFLAGS="cru"
build_shared="no"
MY_SHFLAGS=" "; MY_SHLINK="lib /NOLOGO"; SHEXT=lib
MY_SHNAME="/OUT:"; MY_LD=" "
build_static="no"
build_shared="yes"
build_visual="yes"
;;
CC)
case "$target" in
......@@ -259,6 +271,7 @@ esac
AM_CONDITIONAL(BUILD_SHARED, test x$build_shared = xyes)
AM_CONDITIONAL(BUILD_STATIC, test x$build_static = xyes)
AM_CONDITIONAL(BUILD_VISUAL, test x$build_visual = xyes)
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_LDFLAGS)
......
......@@ -35,11 +35,19 @@ all-local: $(shareddir) $(lib_shared)
$(shareddir):
test -d $(shareddir) || mkdir $(shareddir)
if BUILD_VISUAL
$(lib_shared): $(libCLHEP_Geometry_@VERSION@_so_OBJECTS)
$(SHLINK) $(SHNAME)$@ $(libCLHEP_Geometry_@VERSION@_so_OBJECTS)
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) /c /Fo$@ $<
else
$(lib_shared): $(libCLHEP_Geometry_@VERSION@_so_OBJECTS)
$(CXXLINK) $(SHLINK) $(SHNAME)$@ $(libCLHEP_Geometry_@VERSION@_so_OBJECTS) -o $@
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) -c -o $@ $<
endif
install-exec-local: $(lib_shared)
@$(NORMAL_INSTALL)
......
......@@ -8,9 +8,12 @@ INCLUDES = -I$(top_builddir)/
if BUILD_STATIC
LDADD = $(top_builddir)/src/libCLHEP-@PACKAGE@-@VERSION@.a \
${top_builddir}/../Vector/src/libCLHEP-Vector-@VERSION@.a
else
if BUILD_VISUAL
else
LIBS += $(MY_LD)$(top_builddir)/src \
$(MY_LD)${top_builddir}/../Vector/src
endif
LDADD = $(top_builddir)/src/libCLHEP-@PACKAGE@-@VERSION@.$(SHEXT) \
${top_builddir}/../Vector/src/libCLHEP-Vector-@VERSION@.$(SHEXT)
endif
......
......@@ -39,6 +39,14 @@ AC_ARG_ENABLE(static,
*) build_static="yes";;
esac],
[build_static="yes"])
AC_ARG_ENABLE(visual,
AC_HELP_STRING([--enable-visual],[on by default when using Visual C++]),
[case "${enableval}" in
yes) build_visual="yes";;
no) build_visual="no";;
*) build_visual="no";;
esac],
[build_visual="no"])
AC_ARG_ENABLE(gmake,
AC_HELP_STRING([--enable-gmake],[use gmake (default is make)]),
......@@ -232,7 +240,11 @@ c++)
cl)
AM_CXXFLAGS="-EHsc -nologo -GR -GX -MD"
AR="ar"; ARFLAGS="cru"
build_shared="no"
MY_SHFLAGS=" "; MY_SHLINK="lib /NOLOGO"; SHEXT=lib
MY_SHNAME="/OUT:"; MY_LD=" "
build_static="no"
build_shared="yes"
build_visual="yes"
;;
CC)
case "$target" in
......@@ -273,6 +285,7 @@ esac
AM_CONDITIONAL(BUILD_SHARED, test x$build_shared = xyes)
AM_CONDITIONAL(BUILD_STATIC, test x$build_static = xyes)
AM_CONDITIONAL(BUILD_VISUAL, test x$build_visual = xyes)
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_LDFLAGS)
......
......@@ -66,11 +66,19 @@ all-local: $(shareddir) $(lib_shared)
$(shareddir):
test -d $(shareddir) || mkdir $(shareddir)
if BUILD_VISUAL
$(lib_shared): $(libCLHEP_HepMC_@VERSION@_so_OBJECTS)
$(SHLINK) $(SHNAME)$@ $(libCLHEP_HepMC_@VERSION@_so_OBJECTS)
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) /c /Fo$@ $<
else
$(lib_shared): $(libCLHEP_HepMC_@VERSION@_so_OBJECTS)
$(CXXLINK) $(SHLINK) $(SHNAME)$@ $(libCLHEP_HepMC_@VERSION@_so_OBJECTS) -o $@
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) -c -o $@ $<
endif
install-exec-local: $(lib_shared)
@$(NORMAL_INSTALL)
......
......@@ -9,9 +9,12 @@ INCLUDES = -I$(top_builddir)/
if BUILD_STATIC
LDADD = $(top_builddir)/src/libCLHEP-@PACKAGE@-@VERSION@.a \
$(top_builddir)/../Vector/src/libCLHEP-Vector-@VERSION@.a
else
if BUILD_VISUAL
else
LIBS += $(MY_LD)$(top_builddir)/src \
$(MY_LD)$(top_builddir)/../Vector/src
endif
LDADD = $(top_builddir)/src/libCLHEP-@PACKAGE@-@VERSION@.$(SHEXT) \
$(top_builddir)/../Vector/src/libCLHEP-Vector-@VERSION@.$(SHEXT)
endif
......
......@@ -39,6 +39,14 @@ AC_ARG_ENABLE(static,
*) build_static="yes";;
esac],
[build_static="yes"])
AC_ARG_ENABLE(visual,
AC_HELP_STRING([--enable-visual],[on by default when using Visual C++]),
[case "${enableval}" in
yes) build_visual="yes";;
no) build_visual="no";;
*) build_visual="no";;
esac],
[build_visual="no"])
AC_ARG_ENABLE(gmake,
AC_HELP_STRING([--enable-gmake],[use gmake (default is make)]),
......@@ -243,7 +251,11 @@ c++)
cl)
AM_CXXFLAGS="-EHsc -nologo -GR -GX -MD"
AR="ar"; ARFLAGS="cru"
build_shared="no"
MY_SHFLAGS=" "; MY_SHLINK="lib /NOLOGO"; SHEXT=lib
MY_SHNAME="/OUT:"; MY_LD=" "
build_static="no"
build_shared="yes"
build_visual="yes"
;;
CC)
case "$target" in
......@@ -284,6 +296,7 @@ esac
AM_CONDITIONAL(BUILD_SHARED, test x$build_shared = xyes)
AM_CONDITIONAL(BUILD_STATIC, test x$build_static = xyes)
AM_CONDITIONAL(BUILD_VISUAL, test x$build_visual = xyes)
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_LDFLAGS)
......
......@@ -87,11 +87,19 @@ all-local: $(shareddir) $(lib_shared)
$(shareddir):
test -d $(shareddir) || mkdir $(shareddir)
if BUILD_VISUAL
$(lib_shared): $(libCLHEP_HepPDT_@VERSION@_so_OBJECTS)
$(SHLINK) $(SHNAME)$@ $(libCLHEP_HepPDT_@VERSION@_so_OBJECTS)
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) /c /Fo$@ $<
else
$(lib_shared): $(libCLHEP_HepPDT_@VERSION@_so_OBJECTS)
$(CXXLINK) $(SHLINK) $(SHNAME)$@ $(libCLHEP_HepPDT_@VERSION@_so_OBJECTS) -o $@
$(shareddir)/%.$(OBJEXT): %.cc
$(CXXCOMPILE) $(SHFLAGS) -c -o $@ $<
endif
install-exec-local: $(lib_shared)
@$(NORMAL_INSTALL)
......
......@@ -8,8 +8,11 @@ INCLUDES = -I$(top_builddir)/
# libraries to link, and whence
if BUILD_STATIC
LDADD = $(top_builddir)/src/libCLHEP-@PACKAGE@-@VERSION@.a
else
if BUILD_VISUAL
else
LIBS += $(MY_LD)$(top_builddir)/src
endif
LDADD = $(top_builddir)/src/libCLHEP-@PACKAGE@-@VERSION@.$(SHEXT)
endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment