diff options
author | Tony Theodore <tonyt@logyst.com> | 2016-10-03 03:50:12 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2016-10-06 03:54:46 (GMT) |
commit | 952d6ebca8904787a1571385bdafa033383973ab (patch) | |
tree | 9578d1e3348c1f1374ea56626304c48f2f535fd3 /src/glpk.mk | |
parent | a528dc936ccc9b881bbe05106dad131b51e53aa2 (diff) | |
download | mxe-952d6ebca8904787a1571385bdafa033383973ab.zip mxe-952d6ebca8904787a1571385bdafa033383973ab.tar.gz mxe-952d6ebca8904787a1571385bdafa033383973ab.tar.bz2 |
add package glpk
Diffstat (limited to 'src/glpk.mk')
-rw-r--r-- | src/glpk.mk | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/glpk.mk b/src/glpk.mk new file mode 100644 index 0000000..29a4958 --- /dev/null +++ b/src/glpk.mk @@ -0,0 +1,42 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := glpk +$(PKG)_IGNORE := +$(PKG)_VERSION := 4.60 +$(PKG)_CHECKSUM := 1356620cb0a0d33ac3411dd49d9fd40d53ece73eaec8f6b8d19a77887ff5e297 +$(PKG)_SUBDIR := glpk-$($(PKG)_VERSION) +$(PKG)_FILE := glpk-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://ftp.gnu.org/gnu/glpk/glpk-$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc gmp + +# internal zlib is always used +# libmysqlclient and odbc not supported on windows (see INSTALL and configure.ac) + +define $(PKG)_UPDATE + $(WGET) -q -O- 'http://ftp.gnu.org/gnu/glpk/?C=M;O=D' | \ + $(SED) -n 's,.*<a href="glpk-\([0-9][^"]*\)\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + # build and install the library + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ + $(MXE_CONFIGURE_OPTS) \ + --with-gmp + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + # create pkg-config files + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'Name: $(PKG)'; \ + echo 'Version: $($(PKG)_VERSION)'; \ + echo 'Description: GNU Linear Programming Kit'; \ + echo 'Libs: -lglpk';) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc' + + # compile test + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(SOURCE_DIR)/examples/netgen.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` +endef |