diff options
author | Tor Lillqvist <tml@iki.fi> | 2011-05-17 05:07:06 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@filifjonkan.site> | 2011-05-17 05:07:06 +0300 |
commit | a857f4529320665e6dc40544228afbf89e699c3a (patch) | |
tree | bfc53ad9c599798769408f20236a4e6843873d76 /lpsolve | |
parent | f578312df033ba819cc4167617d035ee80cda8ba (diff) |
Enable MinGW cross-compilation of lpsolve
Diffstat (limited to 'lpsolve')
-rw-r--r-- | lpsolve/lp_solve_5.5.patch | 28 | ||||
-rw-r--r-- | lpsolve/makefile.mk | 7 |
2 files changed, 33 insertions, 2 deletions
diff --git a/lpsolve/lp_solve_5.5.patch b/lpsolve/lp_solve_5.5.patch index e9e7f19523fc..072f625d0ccd 100644 --- a/lpsolve/lp_solve_5.5.patch +++ b/lpsolve/lp_solve_5.5.patch @@ -1,12 +1,38 @@ --- misc/lp_solve_5.5/lpsolve55/ccc Sat Jun 11 21:27:18 2005 +++ misc/build/lp_solve_5.5/lpsolve55/ccc Wed May 21 17:19:56 2008 -@@ -1,5 +1,5 @@ +@@ -1,11 +1,20 @@ src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../colamd/colamd.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 +c=$CC def= so= ++soprefix= ++libs= ++pic= ++ldflags= ++inline= +-if [ "$PLATFORM" = "SCO_UNIX" ] +-then def='-dy -K PIC -DNOLONGLONG' +- dl=-lc +-else dl=-ldl +- so=y ++if [ "$GUI" = "WNT" -a "$COM" = "GCC" ]; then ++ so=dll ++ inline=-DINLINE=static ++else ++ so=so ++ soprefix=lib ++ libs=-lc -lm -ldl ++ pic=-fpic ++ ldflags=-Wl,-Bsymbolic -Wl,-soname,liblpsolve55.$so + fi +@@ -19,3 +19,3 @@ +- $c -fpic -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src +- $c -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm -ldl ++ $c $pic -s $inline -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src ++ $c -shared $ldflags -o ${soprefix}lpsolve55.$so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` $libs + fi --- misc/lp_solve_5.5/lpsolve55/ccc.os2 2008-11-26 12:49:36.000000000 +0100 +++ misc/build/lp_solve_5.5/lpsolve55/ccc.os2 2008-09-25 17:27:48.000000000 +0200 @@ -1 +1,13 @@ diff --git a/lpsolve/makefile.mk b/lpsolve/makefile.mk index de43397be701..408c6f00b55d 100644 --- a/lpsolve/makefile.mk +++ b/lpsolve/makefile.mk @@ -39,7 +39,7 @@ TARGET=lpsolve TARFILE_NAME=lp_solve_5.5 TARFILE_MD5=26b3e95ddf3d9c077c480ea45874b3b8 -.IF "$(GUI)"=="WNT" +.IF "$(GUI_FOR_BUILD)"=="WNT" PATCH_FILES=lp_solve_5.5-windows.patch .ELSE PATCH_FILES=\ @@ -65,8 +65,13 @@ lpsolve_LDFLAGS=-shared-libgcc .IF "$(MINGW_SHARED_GXXLIB)"=="YES" lpsolve_LIBS=$(MINGW_SHARED_LIBSTDCPP) .ENDIF +.IF "$(GUI_FOR_BUILD)"=="WNT" BUILD_ACTION=lpsolve_LDFLAGS=$(lpsolve_LDFLAGS) lpsolve_LIBS=$(lpsolve_LIBS) cmd /c cgcc.bat .ELSE +BUILD_ACTION=sh ccc +OUT2LIB=$(BUILD_DIR)$/liblpsolve55.a +.ENDIF +.ELSE BUILD_ACTION=cmd /c cvc6.bat OUT2LIB=$(BUILD_DIR)$/lpsolve55.lib .ENDIF |