Mercurial > mxe-octave
comparison src/fltk.mk @ 2997:4f9b72cf7ee7
allow native builds too
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 28 May 2013 17:31:59 -0400 |
parents | 1f944d8d6fe5 |
children | 733c487c69c6 |
comparison
equal
deleted
inserted
replaced
2996:446aa596bb99 | 2997:4f9b72cf7ee7 |
---|---|
5 $(PKG)_IGNORE := | 5 $(PKG)_IGNORE := |
6 $(PKG)_CHECKSUM := 717242e8aa118020cc05aa788015a2933895b99c | 6 $(PKG)_CHECKSUM := 717242e8aa118020cc05aa788015a2933895b99c |
7 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) | 7 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) |
8 $(PKG)_FILE := $($(PKG)_SUBDIR)-source.tar.gz | 8 $(PKG)_FILE := $($(PKG)_SUBDIR)-source.tar.gz |
9 $(PKG)_URL := http://fltk.org/pub/fltk/$($(PKG)_VERSION)/$($(PKG)_FILE) | 9 $(PKG)_URL := http://fltk.org/pub/fltk/$($(PKG)_VERSION)/$($(PKG)_FILE) |
10 $(PKG)_DEPS := gcc zlib jpeg libpng pthreads uuid | 10 ifeq ($(MXE_SYSTEM),mingw) |
11 $(PKG)_DEPS := gcc zlib jpeg libpng pthreads uuid | |
12 else | |
13 $(PKG)_DEPS := gcc zlib jpeg libpng pthreads | |
14 endif | |
11 | 15 |
12 define $(PKG)_UPDATE | 16 define $(PKG)_UPDATE |
13 $(WGET) -q -O- 'http://www.fltk.org/' | \ | 17 $(WGET) -q -O- 'http://www.fltk.org/' | \ |
14 $(SED) -n 's,.*>v\([0-9][^<]*\)<.*,\1,p' | \ | 18 $(SED) -n 's,.*>v\([0-9][^<]*\)<.*,\1,p' | \ |
15 grep -v '^1\.1\.' | \ | 19 grep -v '^1\.1\.' | \ |
16 head -1 | 20 head -1 |
17 endef | 21 endef |
18 | 22 |
19 define $(PKG)_BUILD | 23 define $(PKG)_BUILD |
20 cd '$(1)' && autoconf | 24 cd '$(1)' && autoconf |
21 $(SED) -i 's,\$$uname,MINGW,g' '$(1)/configure' | 25 ## $(SED) -i 's,\$$uname,MINGW,g' '$(1)/configure' |
22 cd '$(1)' && ./configure \ | 26 cd '$(1)' && ./configure \ |
27 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \ | |
28 DSOFLAGS='-L$(PREFIX)/$(TARGET)/lib' \ | |
23 --host='$(TARGET)' \ | 29 --host='$(TARGET)' \ |
24 --build="`config.guess`" \ | 30 --build="`config.guess`" \ |
25 $(ENABLE_SHARED_OR_STATIC) \ | 31 $(ENABLE_SHARED_OR_STATIC) \ |
26 --prefix='$(PREFIX)/$(TARGET)' \ | 32 --prefix='$(PREFIX)/$(TARGET)' \ |
27 --enable-threads \ | 33 --enable-threads |
28 LIBS='-lws2_32' | 34 ## LIBS='-lws2_32' |
29 # enable exceptions, because disabling them doesn't make any sense on PCs | 35 # enable exceptions, because disabling them doesn't make any sense on PCs |
30 $(SED) -i 's,-fno-exceptions,,' '$(1)/makeinclude' | 36 $(SED) -i 's,-fno-exceptions,,' '$(1)/makeinclude' |
31 $(MAKE) -C '$(1)' -j '$(JOBS)' install DIRS=src LIBCOMMAND='$(TARGET)-ar cr' | 37 $(MAKE) -C '$(1)' -j '$(JOBS)' install DIRS=src LIBCOMMAND='$(MXE_AR) cr' |
32 ln -sf '$(PREFIX)/$(TARGET)/bin/fltk-config' '$(PREFIX)/bin/$(TARGET)-fltk-config' | 38 ln -sf '$(MXE_BINDIR)/fltk-config' '$(PREFIX)/bin/$(TARGET)-fltk-config' |
33 | |
34 '$(TARGET)-g++' \ | |
35 -W -Wall -Werror -pedantic -ansi \ | |
36 '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-fltk.exe' \ | |
37 `$(TARGET)-fltk-config --cxxflags --ldstaticflags` | |
38 endef | 39 endef |