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

Contents of /trunk/src/Makefile.am

Parent Directory Parent Directory | Revision Log Revision Log


Revision 216 - (show annotations) (download)
Mon Dec 5 09:28:34 2005 UTC (8 years, 7 months ago) by azarah
File size: 2150 byte(s)
Rename sandbox_futils.c to sandbox_utils.c.  Add gstrndup() and gbasename()
to sandbox_utils.c.  Add check for glibc, and fixup things to not need glibc
only extensions if not needed for versioned symbols.

1 AUTOMAKE_OPTIONS = foreign
2
3 lib_LTLIBRARIES = libsandbox.la
4 bin_PROGRAMS = sandbox
5
6 AM_CPPFLAGS = \
7 -DPIC -fPIC -D_REENTRANT \
8 -DLIBSANDBOX_PATH=\"$(libdir)\" \
9 -DSANDBOX_BASHRC_PATH=\"$(pkgdatadir)\" \
10 -I$(top_srcdir) -Wall
11
12 if HAVE_GLIBC
13 AM_CPPFLAGS += -DHAVE_GLIBC
14 endif
15
16 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 # Do not add -nostdlib or -nostartfiles, as then our constructor
22 # and destructor will not be executed ...
23 libsandbox_la_LIBADD = -lc -ldl
24 libsandbox_la_LDFLAGS = \
25 -nodefaultlibs \
26 -Wl,--version-script,libsandbox.map
27 libsandbox_la_SOURCES = \
28 libsandbox.c \
29 getcwd.c \
30 canonicalize.c \
31 sandbox_utils.c \
32 $(LOCAL_INCLUDES)
33
34 sandbox_CFLAGS = -DOUTSIDE_LIBSANDBOX
35 sandbox_SOURCES = \
36 sandbox.c \
37 sandbox.h \
38 sandbox_utils.c \
39 getcwd.c \
40 $(LOCAL_INCLUDES)
41
42 libsandbox.c: libsandbox.map symbols.h
43
44 SYMBOLS_FILE = $(srcdir)/symbols.h.in
45 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 @echo "Generating $@"; \
51 if [ ! -e "$(LIBC_PATH)" ]; then\
52 echo -e "\n*** Cannot find LIBC_PATH '$(LIBC_PATH)' !\n"; \
53 exit 1; \
54 fi; \
55 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 EXTRA_DIST = $(SYMBOLS_FILE)
78
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