Mercurial > audlegacy-plugins
comparison buildsys.mk.in @ 2856:59ff744e1e23
merge
author | Paula Stanciu <paula.stanciu@gmail.com> |
---|---|
date | Fri, 01 Aug 2008 22:55:49 +0300 |
parents | f2bec2d589d6 |
children | 74c302381136 |
comparison
equal
deleted
inserted
replaced
2855:162766a69f12 | 2856:59ff744e1e23 |
---|---|
1 # | 1 # |
2 # Copyright (c) 2007, Jonathan Schleifer <js-buildsys@webkeks.org> | 2 # Copyright (c) 2007 - 2008, Jonathan Schleifer <js-buildsys@webkeks.org> |
3 # | 3 # |
4 # https://webkeks.org/hg/buildsys/ | 4 # https://webkeks.org/hg/buildsys/ |
5 # | 5 # |
6 # Permission to use, copy, modify, and/or distribute this software for any | 6 # Permission to use, copy, modify, and/or distribute this software for any |
7 # purpose with or without fee is hereby granted, provided that the above | 7 # purpose with or without fee is hereby granted, provided that the above |
44 LIB_CPPFLAGS = @LIB_CPPFLAGS@ | 44 LIB_CPPFLAGS = @LIB_CPPFLAGS@ |
45 LIB_CFLAGS = @LIB_CFLAGS@ | 45 LIB_CFLAGS = @LIB_CFLAGS@ |
46 LIB_LDFLAGS = @LIB_LDFLAGS@ | 46 LIB_LDFLAGS = @LIB_LDFLAGS@ |
47 LIB_PREFIX = @LIB_PREFIX@ | 47 LIB_PREFIX = @LIB_PREFIX@ |
48 LIB_SUFFIX = @LIB_SUFFIX@ | 48 LIB_SUFFIX = @LIB_SUFFIX@ |
49 PLUGIN_DEFNAME = `echo -n ${subst ${PLUGIN_SUFFIX},,${PLUGIN}} | tr [:lower:] [:upper:] | tr -C [:alnum:] _` | 49 PLUGIN_DEFNAME = `echo ${subst ${PLUGIN_SUFFIX},,${PLUGIN}} | tr [:lower:] [:upper:]` |
50 PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -D${PLUGIN_DEFNAME}_CFGID=\"${subst ${PLUGIN_SUFFIX},,${PLUGIN}}\" | 50 PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -D${PLUGIN_DEFNAME}_CFGID=\"${subst ${PLUGIN_SUFFIX},,${PLUGIN}}\" |
51 PLUGIN_CFLAGS = @PLUGIN_CFLAGS@ | 51 PLUGIN_CFLAGS = @PLUGIN_CFLAGS@ |
52 PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ | 52 PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ |
53 PLUGIN_SUFFIX = @PLUGIN_SUFFIX@ | 53 PLUGIN_SUFFIX = @PLUGIN_SUFFIX@ |
54 INSTALL_LIB = @INSTALL_LIB@ | 54 INSTALL_LIB = @INSTALL_LIB@ |
73 OBJS1 = ${SRCS:.c=.o} | 73 OBJS1 = ${SRCS:.c=.o} |
74 OBJS2 = ${OBJS1:.cc=.o} | 74 OBJS2 = ${OBJS1:.cc=.o} |
75 OBJS3 = ${OBJS2:.cxx=.o} | 75 OBJS3 = ${OBJS2:.cxx=.o} |
76 OBJS4 = ${OBJS3:.d=.o} | 76 OBJS4 = ${OBJS3:.d=.o} |
77 OBJS5 = ${OBJS4:.erl=.beam} | 77 OBJS5 = ${OBJS4:.erl=.beam} |
78 OBJS += ${OBJS5:.m=.o} | 78 OBJS6 = ${OBJS5:.m=.o} |
79 DEPS += ${OBJS:.o=.dep} | 79 OBJS += ${OBJS6:.xpm=.o} |
80 | 80 |
81 .SILENT: | 81 .SILENT: |
82 .SUFFIXES: .beam .c .cc .cxx .d .dep .erl .m | 82 .SUFFIXES: .beam .c .cc .cxx .d .dep .erl .m .xpm |
83 .PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean | 83 .PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean |
84 | 84 |
85 all: | 85 all: |
86 for i in subdirs depend ${STATIC_LIB} ${STATIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST}; do \ | 86 for i in subdirs depend ${STATIC_LIB} ${STATIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST}; do \ |
87 ${MAKE} ${MFLAGS} $$i || exit 1; \ | 87 ${MAKE} ${MFLAGS} $$i || exit 1; \ |
94 ${DIR_LEAVE}; \ | 94 ${DIR_LEAVE}; \ |
95 done | 95 done |
96 | 96 |
97 depend: pre-depend ${SRCS} | 97 depend: pre-depend ${SRCS} |
98 regen=0; \ | 98 regen=0; \ |
99 deps=""; \ | |
99 test -f .deps || regen=1; \ | 100 test -f .deps || regen=1; \ |
100 for i in ${SRCS}; do test $$i -nt .deps && regen=1; done; \ | 101 for i in ${SRCS}; do \ |
101 if test x"$$regen" = x"1" -a x"${DEPS}" != "x"; then \ | 102 case $$i in \ |
103 *.o) \ | |
104 test $$i -nt .deps && regen=1; \ | |
105 deps="$${deps%.o}.dep $$i"; \ | |
106 ;; \ | |
107 esac; \ | |
108 done; \ | |
109 if test x"$$regen" = x"1" -a x"$$deps" != "x"; then \ | |
102 ${DEPEND_STATUS}; \ | 110 ${DEPEND_STATUS}; \ |
103 rm -f .deps; \ | 111 rm -f .deps; \ |
104 if ${MAKE} ${MFLAGS} ${DEPS}; then \ | 112 if ${MAKE} ${MFLAGS} $$deps; then \ |
105 cat ${DEPS} >.deps; \ | 113 cat $$deps >.deps; \ |
106 rm -f ${DEPS}; \ | 114 rm -f $$deps; \ |
107 ${DEPEND_OK}; \ | 115 ${DEPEND_OK}; \ |
108 else \ | 116 else \ |
109 rm -f .deps ${DEPS}; \ | 117 rm -f .deps $$deps; \ |
110 ${DEPEND_FAILED}; \ | 118 ${DEPEND_FAILED}; \ |
111 fi; \ | 119 fi; \ |
112 fi | 120 fi |
113 | 121 |
114 .c.dep .cc.dep .cxx.dep .m.dep: | 122 .c.dep .cc.dep .cxx.dep .m.dep: |
115 ${CPP} ${CPPFLAGS} -M $< >$@ | 123 ${CPP} ${CPPFLAGS} -M $< >$@ |
116 | 124 |
117 .d.dep: | 125 .d.dep: |
126 .xpm.dep: | |
118 | 127 |
119 pre-depend: | 128 pre-depend: |
120 | 129 |
121 ${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS} | 130 ${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS} |
122 ${LINK_STATUS} | 131 ${LINK_STATUS} |
191 fi | 200 fi |
192 | 201 |
193 .m.o: | 202 .m.o: |
194 ${COMPILE_STATUS} | 203 ${COMPILE_STATUS} |
195 if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ | 204 if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ |
205 ${COMPILE_OK}; \ | |
206 else \ | |
207 ${COMPILE_FAILED}; \ | |
208 fi | |
209 | |
210 .xpm.o: | |
211 ${COMPILE_STATUS} | |
212 if ${CC} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \ | |
196 ${COMPILE_OK}; \ | 213 ${COMPILE_OK}; \ |
197 else \ | 214 else \ |
198 ${COMPILE_FAILED}; \ | 215 ${COMPILE_FAILED}; \ |
199 fi | 216 fi |
200 | 217 |