|
From: | Ted Byers |
Subject: | ‘multiple target patterns. Stop.’ error in my first makefile to use with GNU Make |
Date: | Thu, 21 Jan 2010 14:42:35 -0500 |
objects := $(patsubst %.c,%.o,$(wildcard *.c))
Here is the pattern rule to generate a file of prerequisites (i.e., a makefile) called ‘name.d’
from a C source file called ‘name.c’:
%.d: %.c
$(CC) -M $(CPPFLAGS) $< > address@hidden; \
sed ’s,\($*\)\.o[ :]*,\1.o $@ : ,g’ < address@hidden > $@; \
rm -f address@hidden
[Prev in Thread] | Current Thread | [Next in Thread] |