Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MinGW batch and make files for building GNU Linear Programming Kit glpk-4.60. Remember to change the HOME environmental variable to the directory of MinGW. These files should be located in either "glpk-4.60/w64" or "glpk-4.60/w32".
rem Build GLPK with MinGW
rem NOTE: Make sure that HOME variable specifies correct path
set HOME="C:\TDM-GCC-64"
set PATH=%HOME%\bin;%HOME%\libexec\gcc\x86_64-w64-mingw32\5.1.0;%PATH%
copy config_MinGW config.h
%HOME%\bin\mingw32-make.exe -f Makefile_MinGW
%HOME%\bin\mingw32-make.exe -f Makefile_MinGW check
pause
/* GLPK configuration file (MinGW) */
#define __WOE__ 1
#define ODBC_DLNAME "odbc32.dll"
/* ODBC shared library name if this feature is enabled */
#if 0
#define MYSQL_DLNAME "libmysql.dll"
/* MySQL shared library name if this feature is enabled */
#endif
/* eof */
# Build GLPK with MinGW
CFLAGS = \
-I. \
-I..\src \
-I..\src\amd \
-I..\src\api \
-I..\src\bflib \
-I..\src\cglib \
-I..\src\colamd \
-I..\src\env \
-I..\src\minisat \
-I..\src\misc \
-I..\src\mpl \
-I..\src\proxy \
-I..\src\simplex \
-I..\src\zlib \
-DHAVE_CONFIG_H=1 \
-O3 \
OBJSET = \
..\src\bfd.o \
..\src\bfx.o \
..\src\glpapi01.o \
..\src\glpapi02.o \
..\src\glpapi03.o \
..\src\glpapi04.o \
..\src\glpapi05.o \
..\src\glpapi06.o \
..\src\glpapi07.o \
..\src\glpapi08.o \
..\src\glpapi09.o \
..\src\glpapi10.o \
..\src\glpapi12.o \
..\src\glpapi13.o \
..\src\glphbm.o \
..\src\glpios01.o \
..\src\glpios02.o \
..\src\glpios03.o \
..\src\glpios07.o \
..\src\glpios09.o \
..\src\glpios10.o \
..\src\glpios11.o \
..\src\glpios12.o \
..\src\glpipm.o \
..\src\glpmat.o \
..\src\glpnpp01.o \
..\src\glpnpp02.o \
..\src\glpnpp03.o \
..\src\glpnpp04.o \
..\src\glpnpp05.o \
..\src\glpnpp06.o \
..\src\glprgr.o \
..\src\glpscl.o \
..\src\glpspm.o \
..\src\glpssx01.o \
..\src\glpssx02.o \
..\src\lux.o \
..\src\spv.o \
..\src\amd\amd_1.o \
..\src\amd\amd_2.o \
..\src\amd\amd_aat.o \
..\src\amd\amd_control.o \
..\src\amd\amd_defaults.o \
..\src\amd\amd_dump.o \
..\src\amd\amd_info.o \
..\src\amd\amd_order.o \
..\src\amd\amd_post_tree.o \
..\src\amd\amd_postorder.o \
..\src\amd\amd_preprocess.o \
..\src\amd\amd_valid.o \
..\src\api\advbas.o \
..\src\api\asnhall.o \
..\src\api\asnlp.o \
..\src\api\asnokalg.o \
..\src\api\ckasn.o \
..\src\api\ckcnf.o \
..\src\api\cplex.o \
..\src\api\cpp.o \
..\src\api\cpxbas.o \
..\src\api\graph.o \
..\src\api\gridgen.o \
..\src\api\intfeas1.o \
..\src\api\maxffalg.o \
..\src\api\maxflp.o \
..\src\api\mcflp.o \
..\src\api\mcfokalg.o \
..\src\api\mcfrelax.o \
..\src\api\minisat1.o \
..\src\api\mpl.o \
..\src\api\mps.o \
..\src\api\netgen.o \
..\src\api\pript.o \
..\src\api\prmip.o \
..\src\api\prrngs.o \
..\src\api\prsol.o \
..\src\api\rdasn.o \
..\src\api\rdcc.o \
..\src\api\rdcnf.o \
..\src\api\rdipt.o \
..\src\api\rdmaxf.o \
..\src\api\rdmcf.o \
..\src\api\rdmip.o \
..\src\api\rdprob.o \
..\src\api\rdsol.o \
..\src\api\rmfgen.o \
..\src\api\strong.o \
..\src\api\topsort.o \
..\src\api\weak.o \
..\src\api\wcliqex.o \
..\src\api\wrasn.o \
..\src\api\wrcc.o \
..\src\api\wrcnf.o \
..\src\api\wript.o \
..\src\api\wrmaxf.o \
..\src\api\wrmcf.o \
..\src\api\wrmip.o \
..\src\api\wrprob.o \
..\src\api\wrsol.o \
..\src\bflib\btf.o \
..\src\bflib\btfint.o \
..\src\bflib\fhv.o \
..\src\bflib\fhvint.o \
..\src\bflib\fvs.o \
..\src\bflib\ifu.o \
..\src\bflib\luf.o \
..\src\bflib\lufint.o \
..\src\bflib\scf.o \
..\src\bflib\scfint.o \
..\src\bflib\sgf.o \
..\src\bflib\sva.o \
..\src\cglib\cfg.o \
..\src\cglib\cfg1.o \
..\src\cglib\cfg2.o \
..\src\cglib\clqcut.o \
..\src\cglib\gmicut.o \
..\src\cglib\gmigen.o \
..\src\cglib\mirgen.o \
..\src\colamd\colamd.o \
..\src\env\alloc.o \
..\src\env\dlsup.o \
..\src\env\env.o \
..\src\env\error.o \
..\src\env\stdout.o \
..\src\env\stream.o \
..\src\env\time.o \
..\src\env\tls.o \
..\src\minisat\minisat.o \
..\src\misc\avl.o \
..\src\misc\bignum.o \
..\src\misc\dimacs.o \
..\src\misc\dmp.o \
..\src\misc\ffalg.o \
..\src\misc\fp2rat.o \
..\src\misc\gcd.o \
..\src\misc\jd.o \
..\src\misc\keller.o \
..\src\misc\mc13d.o \
..\src\misc\mc21a.o \
..\src\misc\mygmp.o \
..\src\misc\okalg.o \
..\src\misc\qmd.o \
..\src\misc\relax4.o \
..\src\misc\rng.o \
..\src\misc\rng1.o \
..\src\misc\round2n.o \
..\src\misc\str2int.o \
..\src\misc\str2num.o \
..\src\misc\strspx.o \
..\src\misc\strtrim.o \
..\src\misc\triang.o \
..\src\misc\wclique.o \
..\src\misc\wclique1.o \
..\src\mpl\mpl1.o \
..\src\mpl\mpl2.o \
..\src\mpl\mpl3.o \
..\src\mpl\mpl4.o \
..\src\mpl\mpl5.o \
..\src\mpl\mpl6.o \
..\src\mpl\mplsql.o \
..\src\proxy\proxy.o \
..\src\proxy\proxy1.o \
..\src\simplex\spxat.o \
..\src\simplex\spxchuzc.o \
..\src\simplex\spxchuzr.o \
..\src\simplex\spxlp.o \
..\src\simplex\spxnt.o \
..\src\simplex\spxprim.o \
..\src\simplex\spxprob.o \
..\src\simplex\spychuzc.o \
..\src\simplex\spychuzr.o \
..\src\simplex\spydual.o \
..\src\zlib\adler32.o \
..\src\zlib\compress.o \
..\src\zlib\crc32.o \
..\src\zlib\deflate.o \
..\src\zlib\gzclose.o \
..\src\zlib\gzlib.o \
..\src\zlib\gzread.o \
..\src\zlib\gzwrite.o \
..\src\zlib\inffast.o \
..\src\zlib\inflate.o \
..\src\zlib\inftrees.o \
..\src\zlib\trees.o \
..\src\zlib\uncompr.o \
..\src\zlib\zio.o \
..\src\zlib\zutil.o
.c.o:
gcc.exe $(CFLAGS) -I../include -o $@ -c $<
all: libglpk.a glpsol.exe
libglpk.a: $(OBJSET)
ar.exe cru libglpk.a $(OBJSET)
glpsol.exe: ../examples/glpsol.o libglpk.a
gcc.exe $(CFLAGS) -o glpsol.exe ../examples/glpsol.o libglpk.a
check: glpsol.exe
./glpsol.exe --version
./glpsol.exe --mps ../examples/murtagh.mps --max
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment