diff options
author | Tony Theodore <tonyt@logyst.com> | 2013-11-11 11:50:52 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2013-11-11 11:50:52 (GMT) |
commit | 388cea9036fb9f41495d35f3add961aa0e0e0371 (patch) | |
tree | 434445ce610447eea2ac4d0f9ef6728334446ad7 /src | |
parent | 06afcb8bba439193921f862192703e9ea203aae5 (diff) | |
download | mxe-388cea9036fb9f41495d35f3add961aa0e0e0371.zip mxe-388cea9036fb9f41495d35f3add961aa0e0e0371.tar.gz mxe-388cea9036fb9f41495d35f3add961aa0e0e0371.tar.bz2 |
package plibc: add pkg-config file and test
Diffstat (limited to 'src')
-rw-r--r-- | src/plibc-test.c | 19 | ||||
-rw-r--r-- | src/plibc.mk | 15 |
2 files changed, 34 insertions, 0 deletions
diff --git a/src/plibc-test.c b/src/plibc-test.c new file mode 100644 index 0000000..c8f7365 --- /dev/null +++ b/src/plibc-test.c @@ -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; +} diff --git a/src/plibc.mk b/src/plibc.mk index e4f5e0a..9e02670 100644 --- a/src/plibc.mk +++ b/src/plibc.mk @@ -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 = |