mirror of https://github.com/bqv/weechat-xmpp
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
768 B
Makefile
25 lines
768 B
Makefile
#!/usr/bin/env -S gmake depend
|
|
# vim: set noexpandtab:
|
|
|
|
.PHONY: depend
|
|
depend: $(DEPS) $(SRCS) $(HDRS)
|
|
echo > ./.depend
|
|
for src in $(SRCS) tests/main.cc; do \
|
|
dir="$$(dirname $$src)"; \
|
|
src="$$(basename $$src)"; \
|
|
if [[ $$src == *.cpp ]]; then \
|
|
echo "$(CXX) $(CPPFLAGS) -MM -MMD -MP -MF - \
|
|
-MT $$dir/.$${src/.cpp/.o} $$dir/$$src >> ./.depend"; \
|
|
$(CXX) $(CPPFLAGS) -MM -MMD -MP -MF - \
|
|
-MT $$dir/.$${src/.cpp/.o} $$dir/$$src >> ./.depend || true ; \
|
|
elif [[ $$src == *.c ]]; then \
|
|
echo "$(CC) $(CFLAGS) -MM -MMD -MP -MF - \
|
|
-MT $$dir/.$${src/.c/.o} $$dir/$$src >> ./.depend"; \
|
|
$(CC) $(CFLAGS) -MM -MMD -MP -MF - \
|
|
-MT $$dir/.$${src/.c/.o} $$dir/$$src >> ./.depend || true ; \
|
|
else continue; \
|
|
fi; \
|
|
done
|
|
|
|
include .depend
|