diff test/dynload_plain/Makefile.generic @ 308:7c6f19d42b31

dynload UTF-8 support for library paths: - added missing support to windows - added test code for all platforms to dynload_plain - doc update
author Tassilo Philipp
date Thu, 24 Oct 2019 23:19:20 +0200
parents 483581921af2
children 73b5b9e224e2
line wrap: on
line diff
--- a/test/dynload_plain/Makefile.generic	Mon Apr 29 11:51:30 2019 +0200
+++ b/test/dynload_plain/Makefile.generic	Thu Oct 24 23:19:20 2019 +0200
@@ -4,22 +4,25 @@
 DEF_C_DYLIB=$(shell ((ls /lib*/libc.so* || ls /usr/lib/libc.so*) | grep -v '\.a$$' | (sort -V -r || sort -t . -n -k 2)) 2>/dev/null | head -1)
 DEF_C_DYLIB!=((ls /lib*/libc.so* || ls /usr/lib/libc.so*) | grep -v '\.a$$' | (sort -V -r || sort -t . -n -k 2)) 2>/dev/null | head -1
 
-APP       = dynload_plain
-OBJS      = dynload_plain.o
-SRCTOP    = ${VPATH}/../..
-BLDTOP    = ../..
-CFLAGS   += -I${SRCTOP}/dynload -DDEF_C_DYLIB=\"${DEF_C_DYLIB}\"
-LDLIBS_D += -L${BLDTOP}/dynload -ldynload_s
+APP        = dynload_plain
+OBJS       = dynload_plain.o
+TEST_U8_SO = dynload_plain_ß_test # @@@ unsure if every platform handles ß, here (ANSI, UTF-8, ...)
+SRCTOP     = ${VPATH}/../..
+BLDTOP     = ../..
+CFLAGS    += -I${SRCTOP}/dynload -DDEF_C_DYLIB=\"${DEF_C_DYLIB}\"
+LDLIBS_D  += -L${BLDTOP}/dynload -ldynload_s
 
 # Works on: Darwin, NetBSD.
 # Linux: add '-ldl'
 .PHONY: all clean install
-all: ${APP}
+all: ${APP} ${TEST_U8_SO}
 ${APP}: ${OBJS}
 	${CC} ${LDFLAGS} ${OBJS} ${LDLIBS_D} ${LDLIBS} -o ${APP}
+${TEST_U8_SO}:
+	echo 'int dynload_plain_testfunc() { return 5; }' | ${CC} -shared -x c - -o ${TEST_U8_SO}
 clean:
-	rm -f ${APP} ${OBJS}
+	rm -f ${APP} ${OBJS} ${TEST_U8_SO}
 install:
 	mkdir -p ${PREFIX}/test
-	cp ${APP} ${PREFIX}/test
+	cp ${APP} ${TEST_U8_SO} ${PREFIX}/test