Better deps generation & allow compilation of XPM files.
This commit is contained in:
parent
86ee279e33
commit
f07cc6065f
1 changed files with 26 additions and 9 deletions
|
@ -73,11 +73,11 @@ OBJS2 = ${OBJS1:.cc=.o}
|
||||||
OBJS3 = ${OBJS2:.cxx=.o}
|
OBJS3 = ${OBJS2:.cxx=.o}
|
||||||
OBJS4 = ${OBJS3:.d=.o}
|
OBJS4 = ${OBJS3:.d=.o}
|
||||||
OBJS5 = ${OBJS4:.erl=.beam}
|
OBJS5 = ${OBJS4:.erl=.beam}
|
||||||
OBJS += ${OBJS5:.m=.o}
|
OBJS6 = ${OBJS5:.m=.o}
|
||||||
DEPS += ${OBJS:.o=.dep}
|
OBJS += ${OBJS6:.xpm=.o}
|
||||||
|
|
||||||
.SILENT:
|
.SILENT:
|
||||||
.SUFFIXES: .beam .c .cc .cxx .d .dep .erl .m
|
.SUFFIXES: .beam .c .cc .cxx .d .dep .erl .m .xpm
|
||||||
.PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean
|
.PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
@ -94,17 +94,25 @@ subdirs:
|
||||||
|
|
||||||
depend: pre-depend ${SRCS}
|
depend: pre-depend ${SRCS}
|
||||||
regen=0; \
|
regen=0; \
|
||||||
|
deps=""; \
|
||||||
test -f .deps || regen=1; \
|
test -f .deps || regen=1; \
|
||||||
for i in ${SRCS}; do test $$i -nt .deps && regen=1; done; \
|
for i in ${SRCS}; do \
|
||||||
if test x"$$regen" = x"1" -a x"${DEPS}" != "x"; then \
|
case $$i in \
|
||||||
|
*.o) \
|
||||||
|
test $$i -nt .deps && regen=1; \
|
||||||
|
deps="$${deps%.o}.dep $$i"; \
|
||||||
|
;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
if test x"$$regen" = x"1" -a x"$$deps" != "x"; then \
|
||||||
${DEPEND_STATUS}; \
|
${DEPEND_STATUS}; \
|
||||||
rm -f .deps; \
|
rm -f .deps; \
|
||||||
if ${MAKE} ${MFLAGS} ${DEPS}; then \
|
if ${MAKE} ${MFLAGS} $$deps; then \
|
||||||
cat ${DEPS} >.deps; \
|
cat $$deps >.deps; \
|
||||||
rm -f ${DEPS}; \
|
rm -f $$deps; \
|
||||||
${DEPEND_OK}; \
|
${DEPEND_OK}; \
|
||||||
else \
|
else \
|
||||||
rm -f .deps ${DEPS}; \
|
rm -f .deps $$deps; \
|
||||||
${DEPEND_FAILED}; \
|
${DEPEND_FAILED}; \
|
||||||
fi; \
|
fi; \
|
||||||
fi
|
fi
|
||||||
|
@ -113,6 +121,7 @@ depend: pre-depend ${SRCS}
|
||||||
${CPP} ${CPPFLAGS} -M $< >$@
|
${CPP} ${CPPFLAGS} -M $< >$@
|
||||||
|
|
||||||
.d.dep:
|
.d.dep:
|
||||||
|
.xpm.dep:
|
||||||
|
|
||||||
pre-depend:
|
pre-depend:
|
||||||
|
|
||||||
|
@ -196,6 +205,14 @@ ${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS}
|
||||||
${COMPILE_FAILED}; \
|
${COMPILE_FAILED}; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
.xpm.o:
|
||||||
|
${COMPILE_STATUS}
|
||||||
|
if ${CC} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \
|
||||||
|
${COMPILE_OK}; \
|
||||||
|
else \
|
||||||
|
${COMPILE_FAILED}; \
|
||||||
|
fi
|
||||||
|
|
||||||
install: ${LIB} ${STATIC_LIB} ${PLUGIN} ${PROG} install-extra
|
install: ${LIB} ${STATIC_LIB} ${PLUGIN} ${PROG} install-extra
|
||||||
for i in ${SUBDIRS}; do \
|
for i in ${SUBDIRS}; do \
|
||||||
${DIR_ENTER}; \
|
${DIR_ENTER}; \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue