commit 5551613
Michael Forney
·
2013-11-23 01:40:14 +0000 UTC
parent 643e1d6
Makefile: Make dependencies work for both .o and .lo
1 files changed,
+2,
-1
M
Makefile
M
Makefile
+2,
-1
1@@ -27,7 +27,8 @@ define check_deps
2 @$(PKG_CONFIG) --exists --print-errors $2
3 endef
4
5-compile = $(call quiet,CC) $(CFLAGS) $(CPPFLAGS) -I . -c -MMD -MP -MF .deps/$(basename $<).d -o $@ $<
6+compile = $(call quiet,CC) $(CFLAGS) $(CPPFLAGS) -I . -c -o $@ $< \
7+ -MMD -MP -MF .deps/$(basename $<).d -MT $(basename $@).o -MT $(basename $@).lo
8 link = $(call quiet,CCLD,$(CC)) $(CFLAGS) -o $@ $^
9 pkgconfig = $(sort $(foreach pkg,$(1),$(if $($(pkg)_$(3)),$($(pkg)_$(3)), \
10 $(shell $(PKG_CONFIG) --$(2) $(pkg)))))