You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
2.3 KiB
47 lines
2.3 KiB
From 11c6cd491bd192e0e3fef9fd2652297797e0fef1 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
Date: Thu, 8 Jun 2023 16:11:00 +0200
|
|
Subject: [PATCH] Link a tool to a shared library
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Build first lpsolve55 (the library), then lp_solve (the tool). It will
|
|
save time and space.
|
|
|
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
---
|
|
lp_solve/ccc | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/lp_solve/ccc b/lp_solve/ccc
|
|
index f86be81..d3aaba8 100644
|
|
--- a/lp_solve/ccc
|
|
+++ b/lp_solve/ccc
|
|
@@ -1,5 +1,5 @@
|
|
:
|
|
-src='../lp_MDO.c ../shared/commonlib.c ../colamd/colamd.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c lp_solve.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
|
|
+src='../lp_MDO.c ../shared/commonlib.c ../colamd/colamd.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
|
|
c=${CC:-cc}
|
|
CFLAGS=${CFLAGS:--O3}
|
|
|
|
@@ -34,11 +34,14 @@ rm "$MYTMP"/isnan.c "$MYTMP"/isnan >/dev/null 2>&1
|
|
rmdir "$MYTMP"
|
|
|
|
def=
|
|
+LIBS=
|
|
if [ "$PLATFORM" = "SCO_UNIX" ]
|
|
then CFLAGS="${CFLAGS} -O0"
|
|
def='-dy -K PIC -DLLONG=long'
|
|
dl=-ldl
|
|
else dl=-ldl
|
|
+ LIBS="-L../lpsolve55/bin/$PLATFORM -llpsolve55"
|
|
+ src=''
|
|
fi
|
|
|
|
-$c $CFLAGS -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I../shared $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src $LDFLAGS -o bin/$PLATFORM/lp_solve $math $dl
|
|
+$c $CFLAGS -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I../shared $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src lp_solve.c $LDFLAGS -o bin/$PLATFORM/lp_solve $math $dl $LIBS
|
|
--
|
|
2.40.1
|
|
|