mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
Makefile: Add automatic dependency tracking to the Makefile.
With this, I really don't miss anything from automake.
This commit is contained in:
parent
28fa0bc2d6
commit
00af443b8e
1 changed files with 7 additions and 3 deletions
10
Makefile
10
Makefile
|
@ -8,13 +8,17 @@ MYLDFLAGS=`pkg-config --libs glib-2.0` `xapian-config --libs`
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue