Make the build id thing work for out of tree builds
[elinks.git] / src / Makefile
blob729dbd866779ad62cd6abe8776ec4f96a161bdb4
1 top_builddir=..
2 include $(top_builddir)/Makefile.config
4 SUBDIRS-$(CONFIG_BOOKMARKS) += bookmarks
5 SUBDIRS-$(CONFIG_COOKIES) += cookies
6 SUBDIRS-$(CONFIG_FORMHIST) += formhist
7 SUBDIRS-$(CONFIG_GLOBHIST) += globhist
8 SUBDIRS-$(CONFIG_ECMASCRIPT) += ecmascript
9 SUBDIRS-$(CONFIG_SCRIPTING) += scripting
11 SUBDIRS = \
12 bfu \
13 cache \
14 config \
15 dialogs \
16 document \
17 encoding \
18 intl \
19 main \
20 mime \
21 network \
22 osdep \
23 protocol \
24 session \
25 terminal \
26 util \
27 viewer
29 # Get the GIT HEAD ID if possible
30 ifdef CG_COMMIT_ID
31 BUILD_ID=$(shell GIT_DIR=$(top_srcdir)/.git $(CG_COMMIT_ID) 2> /dev/null)
32 endif
33 INCLUDES += -DBUILD_ID="\"$(BUILD_ID)\""
35 OBJS = vernum.o
36 vernum.o: FORCE
37 FORCE:
39 elinks: lib.o
40 $(call cmd,link)
42 PROGS = elinks
44 include $(top_srcdir)/Makefile.lib