Mercurial > audlegacy
view buildsys.mk.in @ 3730:ebf763c51061
Use GCallback instead of GtkSignalFunc.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Sat, 13 Oct 2007 19:08:44 -0500 |
parents | 33acaa5a01b3 |
children | b0f65f70467d |
line wrap: on
line source
# # Copyright (c) 2007, Jonathan Schleifer <js@h3c.de> # # 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. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # PACKAGE = @PACKAGE@ CC = @CC@ CXX = @CXX@ CPP = @CPP@ DC = @DC@ ERLC = @ERLC@ OBJC = @OBJC@ AR = @AR@ LD = ${CC} CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ CPPFLAGS = @CPPFLAGS@ DFLAGS = @DFLAGS@ ERLCFLAGS = @ERLCFLAGS@ OBJCFLAGS = @OBJCFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ PROG_IMPLIB_NEEDED = @PROG_IMPLIB_NEEDED@ PROG_IMPLIB_LDFLAGS = @PROG_IMPLIB_LDFLAGS@ PROG_SUFFIX = @EXEEXT@ LIB_CPPFLAGS = @LIB_CPPFLAGS@ LIB_CFLAGS = @LIB_CFLAGS@ LIB_LDFLAGS = @LIB_LDFLAGS@ LIB_PREFIX = @LIB_PREFIX@ LIB_SUFFIX = @LIB_SUFFIX@ PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ PLUGIN_CFLAGS = @PLUGIN_CFLAGS@ PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ PLUGIN_SUFFIX = @PLUGIN_SUFFIX@ INSTALL_LIB = @INSTALL_LIB@ UNINSTALL_LIB = @UNINSTALL_LIB@ CLEAN_LIB = @CLEAN_LIB@ LN_S = @LN_S@ MKDIR_P = mkdir -p INSTALL = install SHELL = @SHELL@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ plugindir ?= ${PACKAGE} datarootdir = @datarootdir@ datadir = @datadir@ includedir = @includedir@ includesubdir ?= ${PACKAGE} mandir = @mandir@ mansubdir ?= man1 OBJS1 = ${SRCS:.c=.o} OBJS2 = ${OBJS1:.cc=.o} OBJS3 = ${OBJS2:.cxx=.o} OBJS4 = ${OBJS3:.d=.o} OBJS5 = ${OBJS4:.erl=.beam} OBJS += ${OBJS5:.m=.o} .SILENT: .SUFFIXES: .beam .c .cc .cxx .d .erl .m .PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean all: for i in subdirs depend ${STATIC_LIB} ${STATIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST}; do \ ${MAKE} ${MFLAGS} $$i || exit 1; \ done subdirs: for i in ${SUBDIRS}; do \ ${DIR_ENTER}; \ ${MAKE} ${MFLAGS} || exit 1; \ ${DIR_LEAVE}; \ done depend: pre-depend ${SRCS} regen=0; \ for i in ${SRCS}; do test $$i -nt .deps && regen=1; done; \ if test x"$$regen" = x"1"; then \ list=""; \ ${DEPEND_STATUS}; \ for i in ${SRCS}; do \ case $${i##*.} in \ c|cc|cxx|m) \ list="$$list $$i"; \ ;; \ esac; \ done; \ if test x"$$list" != "x"; then \ if ${CPP} ${CPPFLAGS} -M $$list >.deps; then \ ${DEPEND_OK}; \ else \ ${DEPEND_FAILED}; \ fi; \ fi; \ fi pre-depend: ${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS} ${LINK_STATUS} if ${LD} -o $@ ${OBJS} ${LDFLAGS} ${LIBS}; then \ ${LINK_OK}; \ else \ ${LINK_FAILED}; \ fi ${LIB} ${LIB_NOINST}: ${EXT_DEPS} ${OBJS} ${LINK_STATUS} if ${LD} -o $@ ${OBJS} ${LIB_LDFLAGS} ${LDFLAGS} ${LIBS}; then \ ${LINK_OK}; \ else \ ${LINK_FAILED}; \ fi ${PLUGIN} ${PLUGIN_NONST}: ${EXT_DEPS} ${OBJS} ${LINK_STATUS} if ${LD} -o $@ ${OBJS} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}; then \ ${LINK_OK}; \ else \ ${LINK_FAILED}; \ fi ${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS} ${LINK_STATUS} if ${AR} cr $@ ${OBJS}; then \ ${LINK_OK}; \ else \ ${LINK_FAILED}; \ fi .c.o: ${COMPILE_STATUS} if ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ ${COMPILE_OK}; \ else \ ${COMPILE_FAILED}; \ fi .cc.o .cxx.o: ${COMPILE_STATUS} if ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ ${COMPILE_OK}; \ else \ ${COMPILE_FAILED}; \ fi .d.o: ${COMPILE_STATUS} if test x"$(basename ${DC})" = x"dmd"; then \ if ${DC} ${DFLAGS} -c -of$@ $<; then \ ${COMPILE_OK}; \ else \ ${COMPILE_FAILED}; \ fi \ else \ if ${DC} ${DFLAGS} -c -o $@ $<; then \ ${COMPILE_OK}; \ else \ ${COMPILE_FAILED}; \ fi \ fi .erl.beam: ${COMPILE_STATUS} if ${ERLC} ${ERLCFLAGS} -o $@ $<; then \ ${COMPILE_OK}; \ else \ ${COMPILE_FAILED}; \ fi .m.o: ${COMPILE_STATUS} if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ ${COMPILE_OK}; \ else \ ${COMPILE_FAILED}; \ fi install: ${LIB} ${STATIC_LIB} ${PLUGIN} ${PROG} install-extra for i in ${SUBDIRS}; do \ ${DIR_ENTER}; \ ${MAKE} ${MFLAGS} install || exit 1; \ ${DIR_LEAVE}; \ done for i in ${LIB}; do \ ${INSTALL_STATUS}; \ if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL_LIB}; then \ ${INSTALL_OK}; \ else \ ${INSTALL_FAILED}; \ fi \ done for i in ${STATIC_LIB}; do \ ${INSTALL_STATUS}; \ if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i; then \ ${INSTALL_OK}; \ else \ ${INSTALL_FAILED}; \ fi \ done for i in ${PLUGIN}; do \ ${INSTALL_STATUS}; \ if ${MKDIR_P} ${DESTDIR}${libdir}/${plugindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/${plugindir}/$$i; then \ ${INSTALL_OK}; \ else \ ${INSTALL_FAILED}; \ fi \ done for i in ${DATA}; do \ ${INSTALL_STATUS}; \ if ${MKDIR_P} $$(dirname ${DESTDIR}${datadir}/${PACKAGE}/$$i) && ${INSTALL} -m 644 $$i ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \ ${INSTALL_OK}; \ else \ ${INSTALL_FAILED}; \ fi \ done for i in ${PROG}; do \ ${INSTALL_STATUS}; \ if ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i; then \ ${INSTALL_OK}; \ else \ ${INSTALL_FAILED}; \ fi \ done for i in ${INCLUDES}; do \ ${INSTALL_STATUS}; \ if ${MKDIR_P} ${DESTDIR}${includedir}/${includesubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${includedir}/${includesubdir}/$$i; then \ ${INSTALL_OK}; \ else \ ${INSTALL_FAILED}; \ fi \ done for i in ${MAN}; do \ ${INSTALL_STATUS}; \ if ${MKDIR_P} ${DESTDIR}${mandir}/${mansubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${mandir}/${mansubdir}/$$i; then \ ${INSTALL_OK}; \ else \ ${INSTALL_FAILED}; \ fi \ done install-extra: uninstall: uninstall-extra for i in ${SUBDIRS}; do \ ${DIR_ENTER}; \ ${MAKE} ${MFLAGS} uninstall || exit 1; \ ${DIR_LEAVE}; \ done for i in ${LIB}; do \ if test -f ${DESTDIR}${libdir}/$$i; then \ if ${UNINSTALL_LIB}; then \ ${DELETE_OK}; \ else \ ${DELETE_FAILED}; \ fi \ fi; \ done for i in ${STATIC_LIB}; do \ if test -f ${DESTDIR}${libdir}/$$i; then \ if rm -f ${DESTDIR}${libdir}/$$i; then \ ${DELETE_OK}; \ else \ ${DELETE_FAILED}; \ fi \ fi \ done for i in ${PLUGIN}; do \ if test -f ${DESTDIR}${libdir}/${plugindir}/$$i; then \ if rm -f ${DESTDIR}${libdir}/${plugindir}/$$i; then \ ${DELETE_OK}; \ else \ ${DELETE_FAILED}; \ fi \ fi \ done -rmdir ${DESTDIR}${libdir}/${plugindir} >/dev/null 2>&1 for i in ${DATA}; do \ if test -f ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \ if rm -f ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \ ${DELETE_OK}; \ else \ ${DELETE_FAILED}; \ fi \ fi \ done for i in ${PROG}; do \ if test -f ${DESTDIR}${bindir}/$$i; then \ if rm -f ${DESTDIR}${bindir}/$$i; then \ ${DELETE_OK}; \ else \ ${DELETE_FAILED}; \ fi \ fi \ done for i in ${INCLUDES}; do \ if test -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \ if rm -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \ ${DELETE_OK}; \ else \ ${DELETE_FAILED}; \ fi \ fi \ done -rmdir ${DESTDIR}${includedir}/${includesubdir} >/dev/null 2>&1 for i in ${MAN}; do \ if test -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \ if rm -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \ ${DELETE_OK}; \ else \ ${DELETE_FAILED}; \ fi \ fi \ done uninstall-extra: clean: for i in ${SUBDIRS}; do \ ${DIR_ENTER}; \ ${MAKE} ${MFLAGS} clean || exit 1; \ ${DIR_LEAVE}; \ done for i in ${OBJS} ${CLEAN} ${CLEAN_LIB} .deps; do \ if test -f $$i -o -d $$i; then \ if rm -fr $$i; then \ ${DELETE_OK}; \ else \ ${DELETE_FAILED}; \ fi \ fi \ done distclean: clean for i in ${SUBDIRS}; do \ ${DIR_ENTER}; \ ${MAKE} ${MFLAGS} distclean || exit 1; \ ${DIR_LEAVE}; \ done for i in ${PROG} ${PROG_NOINST} ${LIB} ${LIB_NOINST} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${DISTCLEAN} *~; do \ if test -f $$i -o -d $$i; then \ if rm -fr $$i; then \ ${DELETE_OK}; \ else \ ${DELETE_FAILED}; \ fi \ fi \ done NORM = \e[0m BOLD = \e[1m RED = \e[0;31m GREEN = \e[0;32m BROWN = \e[0;33m BLUE = \e[0;34m CYAN = \e[0;36m KILL = \e[K DIR_ENTER = printf "${KILL}${CYAN}Entering directory ${BOLD}$$i${CYAN}.${NORM}\n"; cd $$i || exit 1 DIR_LEAVE = printf "${KILL}${CYAN}Leaving directory ${BOLD}$$i${CYAN}.${NORM}\n"; cd .. || exit 1 DEPEND_STATUS = printf "${KILL}${BROWN}Generating dependencies...${NORM}\r" DEPEND_OK = printf "${KILL}${GREEN}Successfully generated dependencies.${NORM}\n" DEPEND_FAILED = printf "${KILL}${RED}Failed to generate dependencies!${NORM}\n"; exit 1 COMPILE_STATUS = printf "${KILL}${BROWN}Compiling ${BOLD}$<${BROWN}...${NORM}\r" COMPILE_OK = printf "${KILL}${GREEN}Successfully compiled ${BOLD}$<${GREEN}.${NORM}\n" COMPILE_FAILED = printf "${KILL}${RED}Failed to compile ${BOLD}$<${RED}!${NORM}\n"; exit 1 LINK_STATUS = printf "${KILL}${BROWN}Linking ${BOLD}$@${BROWN}...${NORM}\r" LINK_OK = printf "${KILL}${GREEN}Successfully linked ${BOLD}$@${GREEN}.${NORM}\n" LINK_FAILED = printf "${KILL}${RED}Failed to link ${BOLD}$@${RED}!${NORM}\n"; exit 1 INSTALL_STATUS = printf "${KILL}${BROWN}Installing ${BOLD}$$i${BROWN}...${NORM}\r" INSTALL_OK = printf "${KILL}${GREEN}Successfully installed ${BOLD}$$i${GREEN}.${NORM}\n" INSTALL_FAILED = printf "${KILL}${RED}Failed to install ${BOLD}$$i${RED}!${NORM}\n"; exit 1 DELETE_OK = printf "${KILL}${BLUE}Deleted ${BOLD}$$i${BLUE}.${NORM}\n" DELETE_FAILED = printf "${KILL}${RED}Failed to delete ${BOLD}$$i${RED}!${NORM}\n"; exit 1 -include .deps