2016-08-22 20:52:34 +01:00
|
|
|
# This file is part of MXE. See LICENSE.md for licensing information.
|
2012-10-04 13:48:09 +01:00
|
|
|
|
2012-12-09 05:50:47 +00:00
|
|
|
PKG := ocaml-flexdll
|
2016-12-18 05:43:56 +00:00
|
|
|
$(PKG)_WEBSITE := http://alain.frisch.fr/
|
|
|
|
$(PKG)_DESCR := flexdll
|
2012-12-09 05:50:47 +00:00
|
|
|
$(PKG)_IGNORE :=
|
2013-07-21 22:26:40 +01:00
|
|
|
$(PKG)_VERSION := 0.31
|
2015-09-23 09:32:58 +01:00
|
|
|
$(PKG)_CHECKSUM := f01d90a8b89a82a6021f3d96a2977a54cb858c561f062a43e5dd451618119e2c
|
2012-12-09 05:50:47 +00:00
|
|
|
$(PKG)_SUBDIR := flexdll
|
|
|
|
$(PKG)_FILE := flexdll-$($(PKG)_VERSION).tar.gz
|
|
|
|
$(PKG)_URL := http://alain.frisch.fr/flexdll/$($(PKG)_FILE)
|
2017-11-25 13:36:07 +00:00
|
|
|
$(PKG)_DEPS := cc ocaml-native
|
2012-10-04 13:48:09 +01:00
|
|
|
|
|
|
|
define $(PKG)_UPDATE
|
2012-12-15 06:14:00 +00:00
|
|
|
$(WGET) -q -O- 'http://alain.frisch.fr/flexdll/?C=M;O=D' | \
|
2012-12-05 07:18:54 +00:00
|
|
|
$(SED) -n 's,.*flexdll-\([0-9][^>]*\)\.tar.gz.*,\1,ip' | \
|
|
|
|
head -1
|
2012-10-04 13:48:09 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(PKG)_BUILD
|
2012-12-05 07:18:54 +00:00
|
|
|
$(MAKE) -C '$(1)' -j '$(JOBS)' \
|
|
|
|
CHAINS=mingw \
|
|
|
|
MINGW_PREFIX=$(TARGET) \
|
|
|
|
OCAMLOPT=$(PREFIX)/$(TARGET)/bin/ocaml-native/ocamlopt \
|
|
|
|
all
|
|
|
|
mkdir -p '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll'
|
|
|
|
cd '$(1)' && mv flexlink.exe flexlink
|
|
|
|
cd '$(1)' && $(INSTALL) -m 0755 flexdll.h '$(PREFIX)/$(TARGET)/include'
|
|
|
|
cd '$(1)' && $(INSTALL) -m 0755 flexlink flexdll_mingw.o \
|
|
|
|
flexdll_initer_mingw.o \
|
|
|
|
'$(PREFIX)/$(TARGET)/lib/ocaml/flexdll'
|
|
|
|
# create flexdll scripts
|
|
|
|
(echo '#!/bin/sh'; \
|
2012-12-31 08:42:05 +00:00
|
|
|
echo 'FLEXDIR="$(PREFIX)/$(TARGET)/lib/ocaml/flexdll" exec '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll/flexlink' -I $(PREFIX)/$(TARGET)/lib -chain mingw -nocygpath "$$@"') \
|
2012-12-05 07:18:54 +00:00
|
|
|
> '$(PREFIX)/bin/$(TARGET)-flexlink'
|
|
|
|
chmod 0755 '$(PREFIX)/bin/$(TARGET)-flexlink'
|
2012-10-04 13:48:09 +01:00
|
|
|
|
2012-12-05 07:18:54 +00:00
|
|
|
echo "testing flexlink..."
|
|
|
|
$(MAKE) -C '$(1)/test' -j '$(JOBS)' dump.exe plug1.dll plug2.dll CC=$(TARGET)-gcc O=o FLEXLINK=$(TARGET)-flexlink
|
|
|
|
#works if wine is installed :
|
|
|
|
#cd '$(1)/test' && ./dump.exe plug1.dll plug2.dll
|
2012-10-04 13:48:09 +01:00
|
|
|
endef
|
2013-05-23 15:38:06 +01:00
|
|
|
|
|
|
|
$(PKG)_BUILD_x86_64-w64-mingw32 =
|
2014-04-06 14:18:15 +01:00
|
|
|
|
|
|
|
$(PKG)_BUILD_SHARED =
|