mirror of https://github.com/omar-polo/gmid.git
use -MMD if the compiler supports it
it's better than the previous Makefile.depend approach since this automatically adapts to the included headers without requiring manual intervention to regen the list.
This commit is contained in:
parent
3483609593
commit
68e38f49b2
22
Makefile
22
Makefile
|
@ -70,7 +70,7 @@ static: ${GMID_OBJS} ${GE_OBJS} ${GG_OBJS}
|
||||||
${CC} ${GG_OBJS} -o gg ${LDFLAGS} ${STATIC}
|
${CC} ${GG_OBJS} -o gg ${LDFLAGS} ${STATIC}
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o compat/*.o y.tab.c y.tab.h y.output gmid ge gg
|
rm -f *.[do] compat/*.[do] y.tab.c y.tab.h y.output gmid ge gg
|
||||||
rm -f compile_flags.txt
|
rm -f compile_flags.txt
|
||||||
${MAKE} -C regress clean
|
${MAKE} -C regress clean
|
||||||
|
|
||||||
|
@ -130,3 +130,23 @@ ${DISTNAME}.tar.gz: ${DISTFILES}
|
||||||
${MAKE} -C regress DESTDIR=${PWD}/.dist/${DISTNAME}/regress dist
|
${MAKE} -C regress DESTDIR=${PWD}/.dist/${DISTNAME}/regress dist
|
||||||
cd .dist/ && tar zcf ../$@ ${DISTNAME}
|
cd .dist/ && tar zcf ../$@ ${DISTNAME}
|
||||||
rm -rf .dist/
|
rm -rf .dist/
|
||||||
|
|
||||||
|
# -- dependencies --
|
||||||
|
|
||||||
|
-include config.d
|
||||||
|
-include dirs.d
|
||||||
|
-include fcgi.d
|
||||||
|
-include gg.d
|
||||||
|
-include gmid.d
|
||||||
|
-include iri.d
|
||||||
|
-include log.d
|
||||||
|
-include logger.d
|
||||||
|
-include mime.d
|
||||||
|
-include proc.d
|
||||||
|
-include proxy.d
|
||||||
|
-include puny.d
|
||||||
|
-include sandbox.d
|
||||||
|
-include server.d
|
||||||
|
-include utf8.d
|
||||||
|
-include utils.d
|
||||||
|
-include y.tab.d
|
||||||
|
|
|
@ -240,6 +240,10 @@ fi
|
||||||
# --------
|
# --------
|
||||||
# tests for config.h
|
# tests for config.h
|
||||||
|
|
||||||
|
if runtest noop MMD -MMD; then
|
||||||
|
CFLAGS="${CFLAGS} -MMD"
|
||||||
|
fi
|
||||||
|
|
||||||
runtest err ERR || true
|
runtest err ERR || true
|
||||||
runtest explicit_bzero EXPLICIT_BZERO || true
|
runtest explicit_bzero EXPLICIT_BZERO || true
|
||||||
runtest freezero FREEZERO || true
|
runtest freezero FREEZERO || true
|
||||||
|
|
Loading…
Reference in New Issue