package plibc: add pkg-config file and test

This commit is contained in:
Tony Theodore 2013-11-11 22:50:52 +11:00
parent 06afcb8bba
commit 388cea9036
2 changed files with 34 additions and 0 deletions

19
src/plibc-test.c Normal file
View File

@ -0,0 +1,19 @@
/*
* This file is part of MXE.
* See index.html for further information.
*
*/
#include "plibc.h"
int main(int argc, char *argv[])
{
(void)argc;
(void)argv;
plibc_init("MXE", "MXE");
PRINTF("%s Test", "PlibC");
plibc_shutdown();
return 0;
}

View File

@ -27,6 +27,21 @@ define $(PKG)_BUILD
--enable-static \
--disable-shared
$(MAKE) -C '$(1)' -j '$(JOBS)' install
# create pkg-config file
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'
(echo 'Name: $(PKG)'; \
echo 'Version: $($(PKG)_VERSION)'; \
echo 'Description: PlibC'; \
echo 'Cflags: -I''$(PREFIX)/$(TARGET)/include/plibc'' -DWINDOWS'; \
echo 'Libs: -lplibc'; \
echo 'Libs.private: -lws2_32 -lole32';) \
> '$(PREFIX)/$(TARGET)/lib/pkgconfig/plibc.pc'
'$(TARGET)-gcc' \
-W -Wall -Werror -std=c99 -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-plibc.exe' \
`'$(TARGET)-pkg-config' --cflags --libs plibc`
endef
$(PKG)_BUILD_i686-w64-mingw32 =