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}
|
||||
OBJS4 = ${OBJS3:.d=.o}
|
||||
OBJS5 = ${OBJS4:.erl=.beam}
|
||||
OBJS += ${OBJS5:.m=.o}
|
||||
DEPS += ${OBJS:.o=.dep}
|
||||
OBJS6 = ${OBJS5:.m=.o}
|
||||
OBJS += ${OBJS6:.xpm=.o}
|
||||
|
||||
.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
|
||||
|
||||
all:
|
||||
|
@ -94,17 +94,25 @@ subdirs:
|
|||
|
||||
depend: pre-depend ${SRCS}
|
||||
regen=0; \
|
||||
deps=""; \
|
||||
test -f .deps || regen=1; \
|
||||
for i in ${SRCS}; do test $$i -nt .deps && regen=1; done; \
|
||||
if test x"$$regen" = x"1" -a x"${DEPS}" != "x"; then \
|
||||
for i in ${SRCS}; do \
|
||||
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}; \
|
||||
rm -f .deps; \
|
||||
if ${MAKE} ${MFLAGS} ${DEPS}; then \
|
||||
cat ${DEPS} >.deps; \
|
||||
rm -f ${DEPS}; \
|
||||
if ${MAKE} ${MFLAGS} $$deps; then \
|
||||
cat $$deps >.deps; \
|
||||
rm -f $$deps; \
|
||||
${DEPEND_OK}; \
|
||||
else \
|
||||
rm -f .deps ${DEPS}; \
|
||||
rm -f .deps $$deps; \
|
||||
${DEPEND_FAILED}; \
|
||||
fi; \
|
||||
fi
|
||||
|
@ -113,6 +121,7 @@ depend: pre-depend ${SRCS}
|
|||
${CPP} ${CPPFLAGS} -M $< >$@
|
||||
|
||||
.d.dep:
|
||||
.xpm.dep:
|
||||
|
||||
pre-depend:
|
||||
|
||||
|
@ -196,6 +205,14 @@ ${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS}
|
|||
${COMPILE_FAILED}; \
|
||||
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
|
||||
for i in ${SUBDIRS}; do \
|
||||
${DIR_ENTER}; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue