/[path-sandbox]/trunk/src/Makefile.am
Gentoo

Contents of /trunk/src/Makefile.am

Parent Directory Parent Directory | Revision Log Revision Log


Revision 222 - (hide annotations) (download)
Mon Dec 5 11:18:39 2005 UTC (12 years, 10 months ago) by azarah
File size: 2222 byte(s)
Split sandbox_on stuff out to libsandbox.h.  Only enable if we do not
have RTLD_NEXT.

1 azarah 183 AUTOMAKE_OPTIONS = foreign
2 ferringb 2
3 azarah 183 lib_LTLIBRARIES = libsandbox.la
4     bin_PROGRAMS = sandbox
5 azarah 29
6 azarah 183 AM_CPPFLAGS = \
7 azarah 216 -DPIC -fPIC -D_REENTRANT \
8     -DLIBSANDBOX_PATH=\"$(libdir)\" \
9     -DSANDBOX_BASHRC_PATH=\"$(pkgdatadir)\" \
10 azarah 189 -I$(top_srcdir) -Wall
11 azarah 183
12     LOCAL_INCLUDES = $(top_srcdir)/localdecls.h
13    
14     # We need -fexceptions here, else we do not catch exceptions
15     # (nptl/tst-cancelx4.c in glibc among others fails for wrapped functions).
16     libsandbox_la_CFLAGS = -fexceptions
17 azarah 220 if HAVE_RTLD_NEXT
18     libsandbox_la_CFLAGS += -DHAVE_RTLD_NEXT
19     endif
20 azarah 37 # Do not add -nostdlib or -nostartfiles, as then our constructor
21     # and destructor will not be executed ...
22 azarah 218 libsandbox_la_LIBADD = -lc $(LIBDL)
23 azarah 183 libsandbox_la_LDFLAGS = \
24 azarah 185 -nodefaultlibs \
25 azarah 183 -Wl,--version-script,libsandbox.map
26     libsandbox_la_SOURCES = \
27 azarah 222 libsandbox.c \
28     libsandbox.h \
29     getcwd.c \
30     canonicalize.c \
31     sandbox_utils.c \
32 azarah 183 $(LOCAL_INCLUDES)
33 ferringb 2
34 azarah 183 sandbox_CFLAGS = -DOUTSIDE_LIBSANDBOX
35     sandbox_SOURCES = \
36 azarah 222 sandbox.c \
37     sandbox.h \
38     sandbox_utils.c \
39     libsandbox.h \
40     getcwd.c \
41 azarah 183 $(LOCAL_INCLUDES)
42 azarah 29
43 azarah 183 libsandbox.c: libsandbox.map symbols.h
44 azarah 29
45 azarah 190 SYMBOLS_FILE = $(srcdir)/symbols.h.in
46 azarah 183 SYMBOLS_LIST = $(shell $(EGREP) -v '^\#' $(SYMBOLS_FILE))
47     GEN_VERSION_MAP_SCRIPT = $(top_srcdir)/scripts/gen_symbol_version_map.awk
48     GEN_HEADER_SCRIPT = $(top_srcdir)/scripts/gen_symbol_header.awk
49    
50     libsandbox.map: $(SYMBOLS_FILE) $(GEN_VERSION_MAP_SCRIPT)
51 azarah 29 @echo "Generating $@"; \
52 ferringb 33 if [ ! -e "$(LIBC_PATH)" ]; then\
53 vapier 52 echo -e "\n*** Cannot find LIBC_PATH '$(LIBC_PATH)' !\n"; \
54 azarah 29 exit 1; \
55     fi; \
56 azarah 183 export SYMBOLS="$(SYMBOLS_LIST)"; \
57     if ! $(READELF) -s $(LIBC_PATH) | \
58     $(AWK) -f $(GEN_VERSION_MAP_SCRIPT) > $@ ; \
59     then \
60     echo "\n*** Failed to generate '$@' !\n"; \
61     exit 1; \
62     fi
63    
64     symbols.h: $(SYMBOLS_FILE) $(GEN_HEADER_SCRIPT)
65     @echo "Generating $@"; \
66     if [ ! -e "$(LIBC_PATH)" ]; then\
67     echo -e "\n*** Cannot find LIBC_PATH '$(LIBC_PATH)' !\n"; \
68     exit 1; \
69     fi; \
70     export SYMBOLS="$(SYMBOLS_LIST)"; \
71     if ! $(READELF) -s $(LIBC_PATH) | \
72     $(AWK) -f $(GEN_HEADER_SCRIPT) > $@ ; \
73     then \
74     echo "\n*** Failed to generate '$@' !\n"; \
75     exit 1; \
76     fi
77    
78 azarah 189 EXTRA_DIST = $(SYMBOLS_FILE)
79 azarah 183
80     CLEANFILES = libsandbox.map symbols.h
81     DISTCLEANFILES = $(CLEANFILES)

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20