Mercurial > mxe-octave
annotate src/ocaml-flexdll.mk @ 4676:3edbea625ba8
build-cmake: depend on build-gcc if not using system GCC
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 20 Apr 2018 13:51:05 -0400 |
parents | 13be64f9f16d |
children |
rev | line source |
---|---|
2835 | 1 # This file is part of mingw-cross-env. |
2 # See doc/index.html for further information. | |
3 | |
4 # zlib | |
5 PKG := ocaml-flexdll | |
6 $(PKG)_IGNORE := | |
3480
13be64f9f16d
move version info from index.html to src/*.mk files
John W. Eaton <jwe@octave.org>
parents:
3048
diff
changeset
|
7 $(PKG)_VERSION := 0.30 |
2835 | 8 $(PKG)_CHECKSUM := 585f066f890c7dca95be7541b4647128335f7df9 |
9 $(PKG)_SUBDIR := flexdll | |
10 $(PKG)_FILE := flexdll-$($(PKG)_VERSION).tar.gz | |
11 $(PKG)_URL := http://alain.frisch.fr/flexdll/$($(PKG)_FILE) | |
3048
5ef49fb3299d
treat gcc and binutils as build tools
John W. Eaton <jwe@octave.org>
parents:
3031
diff
changeset
|
12 $(PKG)_DEPS := ocaml-native |
2835 | 13 |
14 define $(PKG)_UPDATE | |
15 wget -q -O- 'http://alain.frisch.fr/flexdll/' | \ | |
16 $(SED) -n 's,.*flexdll-\([0-9][^>]*\)\.tar.gz.*,\1,ip' | \ | |
17 head -1 | |
18 endef | |
19 | |
20 define $(PKG)_BUILD | |
21 $(MAKE) -C '$(1)' -j '$(JOBS)' \ | |
22 CHAINS=mingw \ | |
23 MINGW_PREFIX=$(TARGET) \ | |
3014
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3012
diff
changeset
|
24 OCAMLOPT=$(HOST_BINDIR)/ocaml-native/ocamlopt \ |
2835 | 25 all |
3014
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3012
diff
changeset
|
26 mkdir -p '$(HOST_LIBDIR)/ocaml/flexdll' |
2835 | 27 cd '$(1)' && mv flexlink.exe flexlink |
28 cd '$(1)' && strip --remove-section=.comment --remove-section=.note flexlink | |
3014
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3012
diff
changeset
|
29 cd '$(1)' && $(INSTALL) -m 0755 flexdll.h '$(HOST_INCDIR)' |
2835 | 30 cd '$(1)' && $(INSTALL) -m 0755 flexlink flexdll_mingw.o \ |
31 flexdll_initer_mingw.o \ | |
3014
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3012
diff
changeset
|
32 '$(HOST_LIBDIR)/ocaml/flexdll' |
2835 | 33 # create flexdll scripts |
3014
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3012
diff
changeset
|
34 cd '$(BUILD_TOOLS_PREFIX)/bin' && $(LN_SF) '$(HOST_LIBDIR)/ocaml/flexdll/flexlink' |
2835 | 35 (echo '#!/bin/sh'; \ |
3014
b6c7244a2f66
Use HOST_BINDIR, HOST_LIBDIR, and HOST_INCDIR instead of MXE_BINDIR, MXE_LIBDIR, and MXE_INCDIR. Attempt to use these variables consistently instead of using $(HOST_PREFIX)/bin, $(HOST_PREFIX)/lib, and $(HOST_PREFIX)/include
John W. Eaton <jwe@octave.org>
parents:
3012
diff
changeset
|
36 echo 'exec flexlink -I $(HOST_LIBDIR) -chain mingw -nocygpath "$$@"') \ |
3031
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3014
diff
changeset
|
37 > '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)flexlink' |
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3014
diff
changeset
|
38 chmod 0755 '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)flexlink' |
2835 | 39 |
40 echo "testing flexlink..." | |
3031
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3014
diff
changeset
|
41 $(MAKE) -C '$(1)/test' -j '$(JOBS)' dump.exe plug1.dll plug2.dll CC=$(MXE_CC) O=o FLEXLINK=$(MXE_TOOL_PREFIX)flexlink |
2835 | 42 #works if wine is installed : |
43 #cd '$(1)/test' && ./dump.exe plug1.dll plug2.dll | |
44 endef |