diff options
author | Guilherme Lima Bernal <dev@lbguilherme.com> | 2015-03-22 02:42:41 (GMT) |
---|---|---|
committer | Guilherme Lima Bernal <dev@lbguilherme.com> | 2015-03-22 02:42:41 (GMT) |
commit | 8d18f9e94ec6d91b2dcb19b4939e73e9faf74ea9 (patch) | |
tree | 18dbdaf698b13bd90c6895f7d7c1bbbee7fbf029 /src/glew.mk | |
parent | da1d6b87578690fa64853239985972b8ffe88923 (diff) | |
download | mxe-8d18f9e94ec6d91b2dcb19b4939e73e9faf74ea9.zip mxe-8d18f9e94ec6d91b2dcb19b4939e73e9faf74ea9.tar.gz mxe-8d18f9e94ec6d91b2dcb19b4939e73e9faf74ea9.tar.bz2 |
Fix compilation of GLEW
1. pkg-config wrongly adds the flag `-I/usr/include`, creating conflict with system headers.
2. cflags contains a define on static builds, so it must come before sources when compiling the test.
Diffstat (limited to 'src/glew.mk')
-rw-r--r-- | src/glew.mk | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/glew.mk b/src/glew.mk index eecae15..63c9417 100644 --- a/src/glew.mk +++ b/src/glew.mk @@ -35,6 +35,7 @@ define $(PKG)_BUILD $(SED) -i -e "s|Cflags:|Cflags: -DGLEW_STATIC|g" '$(1)'/glew.pc '$(1)'/glewmx.pc $(SED) -i -e "s|Requires:|Requires: gl|g" '$(1)'/glew.pc '$(1)'/glewmx.pc ) + $(SED) -i -e "s|prefix=/usr|prefix=$(PREFIX)/$(TARGET)|g" '$(1)'/glew.pc '$(1)'/glewmx.pc # Install $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' @@ -58,10 +59,12 @@ define $(PKG)_BUILD # Test '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ + `'$(TARGET)-pkg-config' glew --cflags` \ '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-glew.exe' \ - `'$(TARGET)-pkg-config' glew --cflags --libs` + `'$(TARGET)-pkg-config' glew --libs` '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ + `'$(TARGET)-pkg-config' glewmx --cflags` \ '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-glewmx.exe' \ - `'$(TARGET)-pkg-config' glewmx --cflags --libs` + `'$(TARGET)-pkg-config' glewmx --libs` endef |