aboutsummaryrefslogtreecommitdiff
path: root/clp-bin/Makefile
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2020-10-13 11:35:15 -0400
committerJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2020-10-13 11:35:15 -0400
commite7e59648f11bc918fbb6664eef5e0c472141a890 (patch)
tree5eeea9bfffe5daf62bfb34e7f9d046fa9c627022 /clp-bin/Makefile
parent8bcc342eb757f7d5c6930b0adc13983e74efee78 (diff)
downloadclp_fortran-e7e59648f11bc918fbb6664eef5e0c472141a890.tar.gz
clp_fortran-e7e59648f11bc918fbb6664eef5e0c472141a890.zip
Added Simply Fortran projects. Added makefile for building Clp on MinGW64.
Diffstat (limited to 'clp-bin/Makefile')
-rw-r--r--clp-bin/Makefile64
1 files changed, 64 insertions, 0 deletions
diff --git a/clp-bin/Makefile b/clp-bin/Makefile
new file mode 100644
index 0000000..4c1ed7c
--- /dev/null
+++ b/clp-bin/Makefile
@@ -0,0 +1,64 @@
+CLP_VERSION=1.17.6
+COINUTILS_VERSION=2.11.4
+
+CLP_SRCDIR=Clp-releases-$(CLP_VERSION)
+COINUTILS_SRCDIR=CoinUtils-releases-$(COINUTILS_VERSION)
+
+OBJDIR=obj
+CLP_OBJDIR=$(OBJDIR)/clp
+COINUTILS_OBJDIR=$(OBJDIR)/coinutils
+
+INSTALL_DIR=install
+
+BASE=$(PWD)
+
+CLP_PKG_CONFIG=$(BASE)/$(INSTALL_DIR)/lib/pkgconfig:$(PKG_CONFIG_PATH)
+
+.PHONY: all clean clp clp-install coinutils coinutils-install
+
+clean:
+ rm -rf $(CLP_OBJDIR)
+ rm -rf $(COINUTILS_OBJDIR)
+ rm -rf $(INSTALL_DIR)
+
+coinutils: $(COINUTILS_OBJDIR)/CoinUtils/src/.libs/libCoinUtils.a
+
+coinutils-install: $(INSTALL_DIR)/lib/libCoinUtils.a
+
+$(COINUTILS_OBJDIR)/Makefile:
+ mkdir -p $(OBJDIR)
+ mkdir -p $(COINUTILS_OBJDIR)
+ cd $(COINUTILS_OBJDIR) && \
+ $(BASE)/$(COINUTILS_SRCDIR)/configure \
+ --enable-static \
+ --prefix=$(BASE)/$(INSTALL_DIR) \
+ --build=x86_64-w64-mingw32 \
+ CC=gcc CXX=g++
+
+$(COINUTILS_OBJDIR)/CoinUtils/src/.libs/libCoinUtils.a: $(COINUTILS_OBJDIR)/Makefile
+ $(MAKE) -C $(COINUTILS_OBJDIR) all
+
+$(INSTALL_DIR)/lib/libCoinUtils.a: $(COINUTILS_OBJDIR)/CoinUtils/src/.libs/libCoinUtils.a
+ $(MAKE) -C $(COINUTILS_OBJDIR) install
+
+clp: $(CLP_OBJDIR)/Clp/src/.libs/libClp.a
+
+clp-install: $(INSTALL_DIR)/lib/libClp.a
+
+$(CLP_OBJDIR)/Makefile: $(INSTALL_DIR)/lib/libCoinUtils.a
+ mkdir -p $(OBJDIR)
+ mkdir -p $(CLP_OBJDIR)
+ cd $(CLP_OBJDIR) && \
+ $(BASE)/$(CLP_SRCDIR)/configure \
+ --enable-static \
+ --prefix=$(BASE)/$(INSTALL_DIR) \
+ --build=x86_64-w64-mingw32 \
+ CC=gcc CXX=g++ PKG_CONFIG_PATH=$(CLP_PKG_CONFIG)
+
+$(CLP_OBJDIR)/Clp/src/.libs/libClp.a: $(CLP_OBJDIR)/Makefile
+ $(MAKE) -C $(CLP_OBJDIR) all
+
+$(INSTALL_DIR)/lib/libClp.a: $(CLP_OBJDIR)/Clp/src/.libs/libClp.a
+ $(MAKE) -C $(CLP_OBJDIR) install
+
+all: $(INSTALL_DIR)/lib/libClp.a $(INSTALL_DIR)/lib/libCoinUtils.a