Mercurial > audlegacy-plugins
changeset 2947:c79e239a816f
Same as for audacious.
author | Jonathan Schleifer <js-audacious@webkeks.org> |
---|---|
date | Thu, 02 Oct 2008 23:53:27 +0200 |
parents | a8fce81bcd40 |
children | b4046e5c478e |
files | buildsys.mk.in extra.mk.in |
diffstat | 2 files changed, 34 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/buildsys.mk.in Sun Sep 28 19:58:28 2008 +0300 +++ b/buildsys.mk.in Thu Oct 02 23:53:27 2008 +0200 @@ -29,7 +29,8 @@ OBJC = @OBJC@ AR = @AR@ LD = ${CC} -TR = @TR@ +RANLIB = @RANLIB@ +PYTHON = @PYTHON@ CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ CPPFLAGS = @CPPFLAGS@ @@ -37,6 +38,7 @@ ERLCFLAGS = @ERLCFLAGS@ OBJCFLAGS = @OBJCFLAGS@ LDFLAGS = @LDFLAGS@ +PYTHON_FLAGS = @PYTHON_FLAGS@ LIBS = @LIBS@ PROG_IMPLIB_NEEDED = @PROG_IMPLIB_NEEDED@ PROG_IMPLIB_LDFLAGS = @PROG_IMPLIB_LDFLAGS@ @@ -46,8 +48,7 @@ LIB_LDFLAGS = @LIB_LDFLAGS@ LIB_PREFIX = @LIB_PREFIX@ LIB_SUFFIX = @LIB_SUFFIX@ -PLUGIN_DEFNAME := `echo ${subst ${PLUGIN_SUFFIX},,${PLUGIN}} | tr '[:lower:]' '[:upper:]' | tr '-' '_'` -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -D${PLUGIN_DEFNAME}_CFGID=\"${subst ${PLUGIN_SUFFIX},,${PLUGIN}}\" +PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ PLUGIN_CFLAGS = @PLUGIN_CFLAGS@ PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ PLUGIN_SUFFIX = @PLUGIN_SUFFIX@ @@ -76,10 +77,11 @@ OBJS4 = ${OBJS3:.d=.o} OBJS5 = ${OBJS4:.erl=.beam} OBJS6 = ${OBJS5:.m=.o} -OBJS += ${OBJS6:.xpm=.o} +OBJS7 = ${OBJS6:.py=.pyc} +OBJS += ${OBJS7:.xpm=.o} .SILENT: -.SUFFIXES: .beam .c .cc .cxx .d .dep .erl .m .xpm +.SUFFIXES: .beam .c .cc .cxx .d .dep .erl .m .py .pyc .xpm .PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean all: @@ -100,9 +102,21 @@ test -f .deps || regen=1; \ for i in ${SRCS}; do \ case $$i in \ - *.o) \ + *.c) \ + test $$i -nt .deps && regen=1; \ + deps="$$deps $${i%.c}.dep"; \ + ;; \ + *.cc) \ test $$i -nt .deps && regen=1; \ - deps="$${deps} $${i%.o}.dep"; \ + deps="$$deps $${i%.cc}.dep"; \ + ;; \ + *.cxx) \ + test $$i -nt .deps && regen=1; \ + deps="$$deps $${i%.cxx}.dep"; \ + ;; \ + *.m) \ + test $$i -nt .deps && regen=1; \ + deps="$$deps $${i%.m}.dep"; \ ;; \ esac; \ done; \ @@ -153,10 +167,11 @@ ${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS} ${LINK_STATUS} - if ${AR} cr $@ ${OBJS}; then \ + if ${AR} cr $@ ${OBJS} && ${RANLIB} ${@}; then \ ${LINK_OK}; \ else \ ${LINK_FAILED}; \ + rm -f $@; \ fi .c.o: @@ -207,6 +222,14 @@ ${COMPILE_FAILED}; \ fi +.py.pyc: + ${COMPILE_STATUS} + if ${PYTHON} ${PYTHON_FLAGS} -c "import py_compile; py_compile.compile('$<')"; then \ + ${COMPILE_OK}; \ + else \ + ${COMPILE_FAILED}; \ + fi + .xpm.o: ${COMPILE_STATUS} if ${CC} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \
--- a/extra.mk.in Sun Sep 28 19:58:28 2008 +0300 +++ b/extra.mk.in Thu Oct 02 23:53:27 2008 +0200 @@ -386,3 +386,6 @@ plugindir = ${pluginlibdir} GTKGLEXT_CFLAGS ?= @GTKGLEXT_CFLAGS@ GTKGLEXT_LIBS ?= @GTKGLEXT_LIBS@ +TR = @TR@ +PLUGIN_DEFNAME := `echo ${subst ${PLUGIN_SUFFIX},,${PLUGIN}} | tr '[:lower:]' '[:upper:]' | tr '-' '_'` +PLUGIN_CPPFLAGS += -D${PLUGIN_DEFNAME}_CFGID="\"${subst ${PLUGIN_SUFFIX},,${PLUGIN}}\""