diff --git a/src/libotr-test.c b/src/libotr-test.c new file mode 100644 index 00000000..77a6b07b --- /dev/null +++ b/src/libotr-test.c @@ -0,0 +1,14 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include +#include + +int main() { + OtrlUserState userstate; + OTRL_INIT; + userstate = otrl_userstate_create(); + otrl_userstate_free(userstate); + return 0; +} diff --git a/src/libotr.mk b/src/libotr.mk index 215713c0..5b30e46e 100644 --- a/src/libotr.mk +++ b/src/libotr.mk @@ -26,4 +26,9 @@ define $(PKG)_BUILD $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' \ $(if $(BUILD_SHARED), LDFLAGS=-no-undefined) $(MXE_DISABLE_CRUFT) $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_CRUFT) + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` endef