Index: buildsys.mk.in ================================================================== --- buildsys.mk.in +++ buildsys.mk.in @@ -1,10 +1,10 @@ # -# Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 -# Jonathan Schleifer +# Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 +# Jonathan Schleifer # -# https://webkeks.org/git/?p=buildsys.git +# https://heap.zone/git/?p=buildsys.git # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice is present in all copies. # @@ -112,14 +112,14 @@ .SUFFIXES: .beam .c .c.dep .cc .cc.dep .class .cxx .cxx.dep .d .erl .lib.o .java .mo .m .m.dep .mm .mm.dep .o .plugin.o .po .py .pyc .rc .S .S.dep .xpm .PHONY: all subdirs subdirs-after pre-depend depend install install-extra uninstall uninstall-extra clean distclean locales ${SUBDIRS} ${SUBDIRS_AFTER} all: ${MAKE} pre-all - ${MAKE} ${MFLAGS} subdirs - ${MAKE} ${MFLAGS} depend + ${MAKE} subdirs + ${MAKE} depend ${MAKE} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${SHARED_LIB} ${SHARED_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST} ${JARFILE} locales - ${MAKE} ${MFLAGS} subdirs-after + ${MAKE} subdirs-after ${MAKE} post-all pre-all post-all: subdirs: ${SUBDIRS} @@ -126,11 +126,11 @@ subdirs-after: ${SUBDIRS_AFTER} ${SUBDIRS} ${SUBDIRS_AFTER}: for i in $@; do \ ${DIR_ENTER}; \ - ${MAKE} ${MFLAGS} || exit $$?; \ + ${MAKE} || exit $$?; \ ${DIR_LEAVE}; \ done depend: pre-depend ${SRCS} regen=0; \ @@ -170,11 +170,11 @@ ;; \ esac; \ done; \ if test x"$$regen" = x"1" -a x"$$deps" != x""; then \ ${DEPEND_STATUS}; \ - if ${MAKE} ${MFLAGS} $$deps && cat $$deps >.deps; then \ + if ${MAKE} $$deps && cat $$deps >.deps; then \ rm -f $$deps; \ ${DEPEND_OK}; \ else \ :> .deps; \ touch -t 0001010000 .deps; \ @@ -621,11 +621,11 @@ fi install: all install-extra for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \ ${DIR_ENTER}; \ - ${MAKE} ${MFLAGS} install || exit $$?; \ + ${MAKE} install || exit $$?; \ ${DIR_LEAVE}; \ done for i in ${SHARED_LIB}; do \ ${INSTALL_STATUS}; \ @@ -702,11 +702,11 @@ install-extra: uninstall: uninstall-extra for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \ ${DIR_ENTER}; \ - ${MAKE} ${MFLAGS} uninstall || exit $$?; \ + ${MAKE} uninstall || exit $$?; \ ${DIR_LEAVE}; \ done for i in ${SHARED_LIB}; do \ if test -f ${DESTDIR}${libdir}/$$i; then \ @@ -795,11 +795,11 @@ uninstall-extra: clean: for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \ ${DIR_ENTER}; \ - ${MAKE} ${MFLAGS} clean || exit $$?; \ + ${MAKE} clean || exit $$?; \ ${DIR_LEAVE}; \ done for i in ${DEPS} ${OBJS} ${OBJS_EXTRA} ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${PLUGIN_OBJS} ${PROG} ${PROG_NOINST} ${SHARED_LIB} ${SHARED_LIB_NOINST} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${CLEAN_LIB} ${MO_FILES} ${CLEAN}; do \ if test -f $$i -o -d $$i; then \ @@ -812,11 +812,11 @@ done distclean: clean for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \ ${DIR_ENTER}; \ - ${MAKE} ${MFLAGS} distclean || exit $$?; \ + ${MAKE} distclean || exit $$?; \ ${DIR_LEAVE}; \ done for i in ${DISTCLEAN} .deps *~; do \ if test -f $$i -o -d $$i; then \ @@ -830,11 +830,11 @@ print-hierarchy: for i in ${SUBDIRS} ${SUBDIRS_AFTER}; do \ echo ${PRINT_HIERARCHY_PREFIX}$$i; \ cd $$i || exit $$?; \ - ${MAKE} ${MFLAGS} PRINT_HIERARCHY_PREFIX=$$i/ print-hierarchy || exit $$?; \ + ${MAKE} PRINT_HIERARCHY_PREFIX=$$i/ print-hierarchy || exit $$?; \ cd .. || exit $$?; \ done print-var: printf '%s\n' '${${VAR}}' Index: m4/buildsys.m4 ================================================================== --- m4/buildsys.m4 +++ m4/buildsys.m4 @@ -1,10 +1,10 @@ dnl -dnl Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 -dnl Jonathan Schleifer +dnl Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016 +dnl Jonathan Schleifer dnl -dnl https://webkeks.org/git/?p=buildsys.git +dnl https://heap.zone/git/?p=buildsys.git dnl dnl Permission to use, copy, modify, and/or distribute this software for any dnl purpose with or without fee is hereby granted, provided that the above dnl copyright notice and this permission notice is present in all copies. dnl @@ -172,10 +172,24 @@ PLUGIN_SUFFIX='.so' INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && rm -f ${DESTDIR}${libdir}/$$i && ${LN_S} $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i' UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}' CLEAN_LIB='' ;; + *-android*) + AC_MSG_RESULT(Android) + LIB_CFLAGS='-fPIC -DPIC' + LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}' + LIB_PREFIX='lib' + LIB_SUFFIX='.so' + LDFLAGS_RPATH='' + PLUGIN_CFLAGS='-fPIC -DPIC' + PLUGIN_LDFLAGS='-shared' + PLUGIN_SUFFIX='.so' + INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i' + UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0' + CLEAN_LIB='' + ;; *) AC_MSG_RESULT(ELF) LIB_CFLAGS='-fPIC -DPIC' LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}' LIB_PREFIX='lib'