Skip to content

Commit

Permalink
Removed glpk and linprog
Browse files Browse the repository at this point in the history
  • Loading branch information
carlobaldassi committed Feb 6, 2013
1 parent 6fef8b2 commit 33dfff5
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 3,353 deletions.
1 change: 0 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ External libraries, if used, include their own licenses:
- [FADDEEVA](https://ab-initio.mit.edu/Faddeeva)
- [FEMTOLISP](https://github.com/JeffBezanson/femtolisp)
- [FFTW](https://fftw.org/doc/License-and-Copyright.html)
- [GLPK](https://www.gnu.org/software/glpk)
- [GMP](https://gmplib.org/manual/Copying.html#Copying)
- [LAPACK](https://netlib.org/lapack/LICENSE.txt)
- [LIBUNWIND](https://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob_plain;f=LICENSE;hb=master)
Expand Down
77 changes: 3 additions & 74 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CONFIG_GUESS := $(shell ./config.guess)
CONFIGURE_COMMON += --host=$(XC_HOST) --build=$(CONFIG_GUESS)
endif

#autoconf configure-driven scripts: llvm readline pcre arpack fftw unwind gmp glpk patchelf
#autoconf configure-driven scripts: llvm readline pcre arpack fftw unwind gmp patchelf
#custom configure-driven script: zlib nginx
#custom Makefile rules: openlibm Rmath double-conversion random gmp-wrapper suitesparse-wrapper suitesparse lapack openblas uv tk-wrapper

Expand All @@ -27,7 +27,7 @@ unexport CONFIG_SITE

STAGE1_DEPS = uv openlibm-extras random Rmath double-conversion
STAGE2_DEPS = gmp-wrapper
STAGE3_DEPS = glpk-wrapper suitesparse-wrapper
STAGE3_DEPS = suitesparse-wrapper

ifeq ($(USE_SYSTEM_LIBUNWIND), 0)
ifeq ($(OS), Linux)
Expand Down Expand Up @@ -78,10 +78,6 @@ ifeq ($(USE_SYSTEM_GMP), 0)
STAGE1_DEPS += gmp
endif

ifeq ($(USE_SYSTEM_GLPK), 0)
STAGE1_DEPS += glpk
endif

ifeq ($(USE_SYSTEM_ZLIB), 0)
STAGE1_DEPS += zlib
endif
Expand Down Expand Up @@ -118,7 +114,7 @@ install: $(addprefix install-, $(LIBS))
cleanall: $(addprefix clean-, $(LIBS))
distclean: $(addprefix distclean-, $(LIBS))
rm -rf $(BUILD)
getall: get-llvm get-readline get-uv get-pcre get-double-conversion get-openlibm get-random get-openblas get-fftw get-suitesparse get-clp get-unwind get-nginx get-gmp get-glpk get-zlib get-patchelf
getall: get-llvm get-readline get-uv get-pcre get-double-conversion get-openlibm get-random get-openblas get-fftw get-suitesparse get-clp get-unwind get-nginx get-gmp get-zlib get-patchelf

## PATHS ##
DIRS = $(addprefix $(BUILD)/,lib include bin share etc)
Expand Down Expand Up @@ -1235,73 +1231,6 @@ check-gmp-wrapper:
install-gmp-wrapper: $(BUILD)/lib/libgmp_wrapper.$(SHLIB_EXT)


## GLPK ##

GLPK_SRC_TARGET = glpk-$(GLPK_VER)/src/.libs/libglpk.$(SHLIB_EXT)
GLPK_OBJ_TARGET = $(BUILD)/lib/libglpk.$(SHLIB_EXT)

glpk-$(GLPK_VER).tar.gz:
$(WGET) https://ftp.gnu.org/gnu/glpk/$@
glpk-$(GLPK_VER)/configure: glpk-$(GLPK_VER).tar.gz
tar zxf $<
touch -c $@
glpk-$(GLPK_VER)/config.status: glpk-$(GLPK_VER)/configure
cd glpk-$(GLPK_VER) && \
./configure $(CONFIGURE_COMMON)
touch -c $@
$(GLPK_SRC_TARGET): glpk-$(GLPK_VER)/config.status
$(MAKE) -C glpk-$(GLPK_VER) $(LIBTOOL_CCLD)
touch -c $@
glpk-$(GLPK_VER)/checked: $(GLPK_SRC_TARGET)
ifeq ($(OS),$(BUILD_OS))
$(MAKE) -C glpk-$(GLPK_VER) $(LIBTOOL_CCLD) check
endif
echo 1 > $@
$(GLPK_OBJ_TARGET): $(GLPK_SRC_TARGET) glpk-$(GLPK_VER)/checked
$(MAKE) -C glpk-$(GLPK_VER) $(LIBTOOL_CCLD) install
$(INSTALL_NAME_CMD)libglpk.dylib $@
$(AUTOTOOLS_PATH_CORRECT)
touch -c $@

clean-glpk:
-$(MAKE) -C glpk-$(GLPK_VER) uninstall || true
-$(MAKE) -C glpk-$(GLPK_VER) clean
distclean-glpk: clean-glpk
-rm -rf glpk-$(GLPK_VER).tar.gz glpk-$(GLPK_VER)

get-glpk: glpk-$(GLPK_VER).tar.gz
configure-glpk: glpk-$(GLPK_VER)/config.status
compile-glpk: $(GLPK_SRC_TARGET)
check-glpk: glpk-$(GLPK_VER)/checked
install-glpk: $(GLPK_OBJ_TARGET) $(BUILD)/lib/libglpk_wrapper.$(SHLIB_EXT)

## GLPK Wrapper

ifeq ($(USE_SYSTEM_GLPK), 1)
GLPKW_INC = -I /usr/include/
GLPKW_LIB = -lglpk
else
GLPKW_INC = -I $(BUILD)/include
GLPKW_LIB = -L$(BUILD)/lib -lglpk
$(BUILD)/lib/libglpk_wrapper.$(SHLIB_EXT): $(GLPK_OBJ_TARGET)
endif

$(BUILD)/lib/libglpk_wrapper.$(SHLIB_EXT): glpk_wrapper.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -O2 -shared $(fPIC) $(GLPKW_INC) glpk_wrapper.c $(GLPKW_LIB) -o $(BUILD)/lib/libglpk_wrapper.$(SHLIB_EXT) $(RPATH_ORIGIN)
$(INSTALL_NAME_CMD)libglpk_wrapper.$(SHLIB_EXT) $@
touch -c $@

clean-glpk-wrapper:
-rm -f $(GLPK_OBJ_TARGET) $(BUILD)/lib/libglpk_wrapper.$(SHLIB_EXT)
distclean-glpk-wrapper: clean-glpk-wrapper

get-glpk-wrapper:
configure-glpk-wrapper:
compile-glpk-wrapper:
check-glpk-wrapper:
install-glpk-wrapper: $(BUILD)/lib/libglpk_wrapper.$(SHLIB_EXT)


## ZLIB ##

ifeq ($(OS),WINNT)
Expand Down
2 changes: 0 additions & 2 deletions extras/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
/glpk-*
/glpk_h.jl
/webrepl_msgtypes_h.jl
17 changes: 2 additions & 15 deletions extras/Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
JULIAHOME = $(abspath ..)
include $(JULIAHOME)/Make.inc

all: glpk_h.jl webrepl_msgtypes_h.jl

GLPK_VER = 4.47

GLPK_CONST = 0x[0-9a-fA-F]+|[-+]?\s*[0-9]+

ifeq ($(USE_SYSTEM_GLPK), 1)
GLPK_PREFIX = /usr/include
else
GLPK_PREFIX = $(JULIAHOME)/deps/glpk-$(GLPK_VER)/src
endif

glpk_h.jl:
$(QUIET_PERL) $(CC) -E -dM $(GLPK_PREFIX)/glpk.h | perl -nle '/^\s*#define\s+GLP_(\w*)\s*\(?($(GLPK_CONST))\)?\s*$$/ and print "const $$1 = int32($$2)"' | sort > $@
all: webrepl_msgtypes_h.jl

webrepl_msgtypes_h.jl: ../ui/webserver/message_types.h
$(QUIET_PERL) $(CC) -E -Dnotdefined $^ > $@

clean:
rm -f glpk_h.jl webrepl_msgtypes_h.jl
rm -f webrepl_msgtypes_h.jl
Loading

0 comments on commit 33dfff5

Please sign in to comment.