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

Contents of /trunk/src/Makefile.am

Parent Directory Parent Directory | Revision Log Revision Log


Revision 218 - (hide annotations) (download)
Mon Dec 5 09:53:28 2005 UTC (12 years, 8 months ago) by azarah
File size: 2154 byte(s)
Add checks for bsd that have dlopen() in libc.
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 azarah 216 if HAVE_GLIBC
13     AM_CPPFLAGS += -DHAVE_GLIBC
14     endif
15    
16 azarah 183 LOCAL_INCLUDES = $(top_srcdir)/localdecls.h
17    
18     # We need -fexceptions here, else we do not catch exceptions
19     # (nptl/tst-cancelx4.c in glibc among others fails for wrapped functions).
20     libsandbox_la_CFLAGS = -fexceptions
21 azarah 37 # Do not add -nostdlib or -nostartfiles, as then our constructor
22     # and destructor will not be executed ...
23 azarah 218 libsandbox_la_LIBADD = -lc $(LIBDL)
24 azarah 183 libsandbox_la_LDFLAGS = \
25 azarah 185 -nodefaultlibs \
26 azarah 183 -Wl,--version-script,libsandbox.map
27     libsandbox_la_SOURCES = \
28 azarah 189 libsandbox.c \
29     getcwd.c \
30     canonicalize.c \
31 azarah 216 sandbox_utils.c \
32 azarah 183 $(LOCAL_INCLUDES)
33 ferringb 2
34 azarah 183 sandbox_CFLAGS = -DOUTSIDE_LIBSANDBOX
35     sandbox_SOURCES = \
36     sandbox.c \
37     sandbox.h \
38 azarah 216 sandbox_utils.c \
39 azarah 183 getcwd.c \
40     $(LOCAL_INCLUDES)
41 azarah 29
42 azarah 183 libsandbox.c: libsandbox.map symbols.h
43 azarah 29
44 azarah 190 SYMBOLS_FILE = $(srcdir)/symbols.h.in
45 azarah 183 SYMBOLS_LIST = $(shell $(EGREP) -v '^\#' $(SYMBOLS_FILE))
46     GEN_VERSION_MAP_SCRIPT = $(top_srcdir)/scripts/gen_symbol_version_map.awk
47     GEN_HEADER_SCRIPT = $(top_srcdir)/scripts/gen_symbol_header.awk
48    
49     libsandbox.map: $(SYMBOLS_FILE) $(GEN_VERSION_MAP_SCRIPT)
50 azarah 29 @echo "Generating $@"; \
51 ferringb 33 if [ ! -e "$(LIBC_PATH)" ]; then\
52 vapier 52 echo -e "\n*** Cannot find LIBC_PATH '$(LIBC_PATH)' !\n"; \
53 azarah 29 exit 1; \
54     fi; \
55 azarah 183 export SYMBOLS="$(SYMBOLS_LIST)"; \
56     if ! $(READELF) -s $(LIBC_PATH) | \
57     $(AWK) -f $(GEN_VERSION_MAP_SCRIPT) > $@ ; \
58     then \
59     echo "\n*** Failed to generate '$@' !\n"; \
60     exit 1; \
61     fi
62    
63     symbols.h: $(SYMBOLS_FILE) $(GEN_HEADER_SCRIPT)
64     @echo "Generating $@"; \
65     if [ ! -e "$(LIBC_PATH)" ]; then\
66     echo -e "\n*** Cannot find LIBC_PATH '$(LIBC_PATH)' !\n"; \
67     exit 1; \
68     fi; \
69     export SYMBOLS="$(SYMBOLS_LIST)"; \
70     if ! $(READELF) -s $(LIBC_PATH) | \
71     $(AWK) -f $(GEN_HEADER_SCRIPT) > $@ ; \
72     then \
73     echo "\n*** Failed to generate '$@' !\n"; \
74     exit 1; \
75     fi
76    
77 azarah 189 EXTRA_DIST = $(SYMBOLS_FILE)
78 azarah 183
79     CLEANFILES = libsandbox.map symbols.h
80     DISTCLEANFILES = $(CLEANFILES)

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20