forked from mxe/mxe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cminpack.mk
39 lines (33 loc) · 1.61 KB
/
cminpack.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := cminpack
$(PKG)_WEBSITE := http://devernay.free.fr/hacks/cminpack/cminpack.html
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.3.4
$(PKG)_CHECKSUM := 3b517bf7dca68cc9a882883db96dac0a0d37d72aba6dfb0c9c7e78e67af503ca
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := http://devernay.free.fr/hacks/cminpack/$($(PKG)_FILE)
$(PKG)_DEPS := cc
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://devernay.free.fr/hacks/cminpack/index.html' | \
$(SED) -n 's,.*cminpack-\([0-9.]*\)\.tar.*,\1,p' | \
head -1
endef
define $(PKG)_BUILD_STATIC
cd '$(1)' && '$(TARGET)-cmake'
$(MAKE) -C '$(1)' -j $(JOBS)
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
$(INSTALL) -m644 '$(1)/libcminpack.a' '$(PREFIX)/$(TARGET)/lib/'
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
$(INSTALL) -m644 '$(1)/cminpack.h' '$(PREFIX)/$(TARGET)/include/'
endef
define $(PKG)_BUILD_SHARED
cd '$(1)' && '$(TARGET)-cmake' -DUSE_FPIC=ON -DSHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
$(MAKE) -C '$(1)' -j $(JOBS)
$(INSTALL) -d '$(PREFIX)/$(TARGET)/bin'
$(INSTALL) -m644 '$(1)/libcminpack.dll' '$(PREFIX)/$(TARGET)/bin/'
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
$(INSTALL) -m644 '$(1)/libcminpack.dll.a' '$(PREFIX)/$(TARGET)/lib/'
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
$(INSTALL) -m644 '$(1)/cminpack.h' '$(PREFIX)/$(TARGET)/include/'
endef