PDA

View Full Version : [ubuntu] Makefile commands



reldon
December 21st, 2008, 10:49 AM
Can somebody please help me understand how this makefile command works?..

all: $(TARGETS)

%.d: %.c
set -e; $(CC) -I. -M $(CPPFLAGS) $< \
| sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
[ -s $@ ] || rm -f $@
ifneq ($(MAKECMDGOALS),clean)
include $(SRCS:.c=.d)
endif

Thanks,

Rel