libepoxy: add test

This commit is contained in:
Boris Nagaev 2017-01-31 02:08:29 +01:00
parent c92ea065fb
commit 769a3c39fc
2 changed files with 16 additions and 0 deletions

10
src/libepoxy-test.c Normal file
View File

@ -0,0 +1,10 @@
/*
* This file is part of MXE. See LICENSE.md for licensing information.
*/
#include <epoxy/gl.h>
int main() {
glGetString(GL_SHADING_LANGUAGE_VERSION);
return 0;
}

View File

@ -26,4 +26,10 @@ define $(PKG)_BUILD
$(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_CRUFT)
$(SED) 's/Cflags:/Cflags: -DEPOXY_$(if $(BUILD_STATIC),STATIC,SHARED)/' \
-i '$(PREFIX)/$(TARGET)/lib/pkgconfig/epoxy.pc'
# compile test
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
`'$(TARGET)-pkg-config' epoxy --cflags --libs`
endef