With this, I really don't miss anything from automake.
all: $(PROGS)
%.o: %.cc
- $(CXX) -c $(CXXFLAGS) $(MYCXXFLAGS) $^ -o $@
+ $(CXX) -c $(CXXFLAGS) $(MYCXXFLAGS) $< -o $@
%.o: %.c
- $(CC) -c $(CFLAGS) $(MYCFLAGS) $^ -o $@
+ $(CC) -c $(CFLAGS) $(MYCFLAGS) $< -o $@
notmuch: notmuch.o database.o date.o message.o xutil.o
$(CC) $(MYLDFLAGS) $^ -o $@
+Makefile.dep: *.c *.cc
+ $(CC) -M $(CPPFLAGS) $(MYCFLAGS) $^ > $@
+-include Makefile.dep
+
clean:
- rm -f $(PROGS) *.o
+ rm -f $(PROGS) *.o Makefile.dep