X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=Makefile;h=0411cbbed663c933fad48d434d9168ea4508995e;hb=2cc316516356f12d21e066121ce64317b3783a9f;hp=96aaa7370c558d5ad6aabab5837fc6efefc0d579;hpb=2ce25b93a72b4a8d6daa5321f9ef7df0772a789f;p=notmuch diff --git a/Makefile b/Makefile index 96aaa737..0411cbbe 100644 --- a/Makefile +++ b/Makefile @@ -4,15 +4,22 @@ CFLAGS=-O2 # Additional flags that we will append to whatever the user set. # These aren't intended for the user to manipulate. -extra_cflags = `pkg-config --cflags glib-2.0 gmime-2.4 talloc` -extra_cxxflags = `xapian-config --cxxflags` +extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc) +extra_cxxflags := $(shell xapian-config --cxxflags) + +emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir) +# Hard-code if this system doesn't have an emacs.pc file +ifeq ($(emacs_lispdir),) + emacs_lispdir = $(prefix)/share/site-lisp +endif # Now smash together user's values with our extra values override CFLAGS += $(WARN_FLAGS) $(extra_cflags) override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags) -override LDFLAGS += `pkg-config --libs glib-2.0 gmime-2.4 talloc` \ - `xapian-config --libs` +override LDFLAGS += \ + $(shell pkg-config --libs glib-2.0 gmime-2.4 talloc) \ + $(shell xapian-config --libs) # Include our local Makefile.local first so that its first target is default include Makefile.local @@ -27,6 +34,9 @@ include Makefile.config %.o: %.c $(CC) -c $(CFLAGS) $< -o $@ +%.elc: %.el + emacs -batch -f batch-byte-compile $< + .deps/%.d: %.c @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \