blob: eb54f42a02da575402f7a32baced1fdd35040e93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
ACLOCAL_AMFLAGS = -I m4
MAKEFLAGS = --no-print-directory
AM_CPPFLAGS = $(SANDBOX_DEFINES)
SUBDIRS = \
scripts \
etc \
data \
libsbutil \
libsandbox \
src \
tests
noinst_LTLIBRARIES =
SANDBOX_PCH = headers.h.gch libsandbox/headers.h.gch libsbutil/headers.h.gch
nodist_libpch_la_SOURCES = $(SANDBOX_PCH)
GCH_CP = ( \
src=`dirname $@`/.libs/`basename $@`.o; \
test -e "$$src" || src=$@.o; \
cp $$src $@ \
)
# This is built as PIC
$(builddir)/libsbutil/headers.h.gch: headers.h
$(AM_V_GEN)$(LTCOMPILE) -c -o $@.o $< && $(GCH_CP)
# This is built as PIC + exceptions
$(builddir)/libsandbox/headers.h.gch: headers.h
$(AM_V_GEN)$(LTCOMPILE) -c -o $@.o $< $(CFLAG_EXCEPTIONS) && $(GCH_CP)
# This is built w/out PIC
$(builddir)/headers.h.gch: headers.h
$(AM_V_GEN)$(COMPILE) -c -o $@.o $< && $(GCH_CP)
if SB_BUILD_PCH
BUILT_SOURCES = $(SANDBOX_PCH)
noinst_LTLIBRARIES += libpch.la
LIBSBUTIL_PCH = libsbutil/headers.h.gch
LIBSANDBOX_PCH = libsandbox/headers.h.gch
TOP_PCH = headers.h.gch
# Make sure we build the subdirs before the top so they don't
# try to use the top level headers.h.pch.
$(TOP_PCH): $(LIBSBUTIL_PCH) $(LIBSANDBOX_PCH)
endif
libsbutil: $(LIBSBUTIL_PCH)
libsandbox: libsbutil $(LIBSANDBOX_PCH)
src: libsbutil $(TOP_PCH)
tests: src $(TOP_PCH)
EXTRA_DIST = headers.h localdecls.h ChangeLog.0
CLEANFILES = $(SANDBOX_PCH)
DISTCLEANFILES = $(CLEANFILES)
ChangeLog:
touch ChangeLog
dist-hook:
set -e ; \
if [ -d "$(top_srcdir)/.git" ] ; then \
git --git-dir="$(top_srcdir)/.git" log > $(distdir)/ChangeLog ; \
elif [ ! -e "$(distdir)/ChangeLog" ] ; then \
if [ -e "$(top_srcdir)/ChangeLog" ] ; then \
cp "$(top_srcdir)/ChangeLog" "$(distdir)/ChangeLog" ; \
else \
touch "$(distdir)/ChangeLog" ; \
fi ; \
fi
install-exec-hook:
set -e ; \
for f in $(bindir)/sandbox $(libdir)/libsandbox.so ; do \
sed -i.tmp \
's:__SANDBOX_TESTING:\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00:' \
$(DESTDIR)$$f ; \
rm -f $(DESTDIR)$$f.tmp ; \
done
|