Skip to content

Commit

Permalink
Revert "Build system update to use static libpoly for all builds when…
Browse files Browse the repository at this point in the history
… configured"

This reverts commit 337025a.
  • Loading branch information
Thomas Hader committed Feb 19, 2024
1 parent d219ec6 commit a80dbe8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 42 deletions.
5 changes: 1 addition & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -829,19 +829,16 @@ fi
#
# Default GMP
#
if test "x$STATIC_LIBGMP" = x ; then
AC_CHECK_LIB(gmp, __gmpz_cmp, [],
[AC_MSG_ERROR([*** GMP library not found. Try to set LDFLAGS ***])])
fi


#
# Default libpoly
#
if test $use_mcsat = yes ; then
if test "x$STATIC_LIBPOLY" = x ; then
AC_CHECK_LIB([poly],[lp_polynomial_new], [], [AC_MSG_ERROR([*** libpoly library not found. Try to set LDFLAGS ***])])
fi
fi

#
# Default CUDD
Expand Down
19 changes: 5 additions & 14 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -875,23 +875,14 @@ endif
# More CPPFLAGS for compiling static objects
#
ifneq ($(STATIC_GMP_INCLUDE_DIR),)
STATIC_GMP_INCLUDE := -I$(STATIC_GMP_INCLUDE_DIR)
STATIC_CPP_GMP := -I$(STATIC_GMP_INCLUDE_DIR)
endif

ifneq ($(STATIC_LIBPOLY_INCLUDE_DIR),)
STATIC_LIBPOLY_INCLUDE := -I$(STATIC_LIBPOLY_INCLUDE_DIR)
STATIC_CPP_LIBPOLY := -I$(STATIC_LIBPOLY_INCLUDE_DIR)
endif

ifneq ($(STATIC_LIBPOLY),)
LIBS := $(subst -lpoly,,$(LIBS)) $(STATIC_LIBPOLY)
endif

ifneq ($(STATIC_GMP),)
LIBS := $(subst -lgmp,,$(LIBS)) $(STATIC_GMP)
endif

STATIC_CPPFLAGS := $(STATIC_GMP_INCLUDE) $(STATIC_LIBPOLY_INCLUDE) $(CPPFLAGS)
CPPFLAGS := $(STATIC_GMP_INCLUDE) $(STATIC_LIBPOLY_INCLUDE) $(CPPFLAGS)
STATIC_CPPFLAGS := $(STATIC_CPP_GMP) $(STATIC_CPP_LIBPOLY) $(CPPFLAGS)

#
# For building dll linked statically with libgmp.a
Expand All @@ -900,11 +891,11 @@ CPPFLAGS := $(STATIC_GMP_INCLUDE) $(STATIC_LIBPOLY_INCLUDE) $(CPPFLAGS)
# we also add the NOYICES_DLL flag.
#
ifeq ($(POSIXOS),cygwin)
STATIC_DLL_CPPFLAGS := $(STATIC_GMP_INCLUDE) $(STATIC_LIBPOLY_INCLUDE) $(CPPFLAGS)
STATIC_DLL_CPPFLAGS := $(STATIC_CPP_GMP) $(STATIC_CPP_LIBPOLY) $(CPPFLAGS)
STATIC_CPPFLAGS += -DNOYICES_DLL
else
ifeq ($(POSIXOS),mingw)
STATIC_DLL_CPPFLAGS := $(STATIC_GMP_INCLUDE) $(STATIC_LIBPOLY_INCLUDE) $(CPPFLAGS)
STATIC_DLL_CPPFLAGS := $(STATIC_CPP_GMP) $(STATIC_CPP_LIBPOLY) $(CPPFLAGS)
STATIC_CPPFLAGS += -DNOYICES_DLL
endif
endif
Expand Down
15 changes: 3 additions & 12 deletions tests/api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -272,23 +272,14 @@ CPPFLAGS := -I../../src -I../../src/include $(CPPFLAGS)
# More CPPFLAGS for compiling static objects
#
ifneq ($(STATIC_GMP_INCLUDE_DIR),)
STATIC_GMP_INCLUDE := -I$(STATIC_GMP_INCLUDE_DIR)
STATIC_CPP_GMP := -I$(STATIC_GMP_INCLUDE_DIR)
endif

ifneq ($(STATIC_LIBPOLY_INCLUDE_DIR),)
STATIC_LIBPOLY_INCLUDE := -I$(STATIC_LIBPOLY_INCLUDE_DIR)
STATIC_CPP_LIBPOLY := -I$(STATIC_LIBPOLY_INCLUDE_DIR)
endif

ifneq ($(STATIC_LIBPOLY),)
LIBS := $(subst -lpoly,,$(LIBS)) $(STATIC_LIBPOLY)
endif

ifneq ($(STATIC_GMP),)
LIBS := $(subst -lgmp,,$(LIBS)) $(STATIC_GMP)
endif

STATIC_CPPFLAGS := $(STATIC_GMP_INCLUDE) $(STATIC_LIBPOLY_INCLUDE) $(CPPFLAGS)
CPPFLAGS := $(STATIC_GMP_INCLUDE) $(STATIC_LIBPOLY_INCLUDE) $(CPPFLAGS)
STATIC_CPPFLAGS := $(STATIC_CPP_GMP) $(STATIC_CPP_LIBPOLY) $(CPPFLAGS)

#
# These are not needed for the tests -DNOYICES_DLL is already
Expand Down
15 changes: 3 additions & 12 deletions tests/unit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -274,23 +274,14 @@ CPPFLAGS := -I../../src -I../../src/include $(CPPFLAGS)
# More CPPFLAGS for compiling static objects
#
ifneq ($(STATIC_GMP_INCLUDE_DIR),)
STATIC_GMP_INCLUDE := -I$(STATIC_GMP_INCLUDE_DIR)
STATIC_CPP_GMP := -I$(STATIC_GMP_INCLUDE_DIR)
endif

ifneq ($(STATIC_LIBPOLY_INCLUDE_DIR),)
STATIC_LIBPOLY_INCLUDE := -I$(STATIC_LIBPOLY_INCLUDE_DIR)
STATIC_CPP_LIBPOLY := -I$(STATIC_LIBPOLY_INCLUDE_DIR)
endif

ifneq ($(STATIC_LIBPOLY),)
LIBS := $(subst -lpoly,,$(LIBS)) $(STATIC_LIBPOLY)
endif

ifneq ($(STATIC_GMP),)
LIBS := $(subst -lgmp,,$(LIBS)) $(STATIC_GMP)
endif

STATIC_CPPFLAGS := $(STATIC_GMP_INCLUDE) $(STATIC_LIBPOLY_INCLUDE) $(CPPFLAGS)
CPPFLAGS := $(STATIC_GMP_INCLUDE) $(STATIC_LIBPOLY_INCLUDE) $(CPPFLAGS)
STATIC_CPPFLAGS := $(STATIC_CPP_GMP) $(STATIC_CPP_LIBPOLY) $(CPPFLAGS)

#
# These are not needed for the tests -DNOYICES_DLL is already
Expand Down

0 comments on commit a80dbe8

Please sign in to comment.