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

Contents of /trunk/src/Makefile.am

Parent Directory Parent Directory | Revision Log Revision Log


Revision 280 - (show annotations) (download)
Wed Jul 5 16:51:12 2006 UTC (8 years, 1 month ago) by azarah
File size: 2173 byte(s)
Use librcutil.

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 INCLUDES = -I$(top_srcdir)/librcutil/include
13 LOCAL_INCLUDES = $(top_srcdir)/localdecls.h
14
15 # We need -fexceptions here, else we do not catch exceptions
16 # (nptl/tst-cancelx4.c in glibc among others fails for wrapped functions).
17 libsandbox_la_CFLAGS = -fexceptions
18 # Do not add -nostdlib or -nostartfiles, as then our constructor
19 # and destructor will not be executed ...
20 libsandbox_la_LIBADD = -lc $(LIBDL)
21 libsandbox_la_LDFLAGS = \
22 -nodefaultlibs \
23 -Wl,--version-script,libsandbox.map
24 libsandbox_la_SOURCES = \
25 libsandbox.c \
26 canonicalize.c \
27 sandbox_utils.c \
28 $(LOCAL_INCLUDES)
29
30 sandbox_CFLAGS = -DOUTSIDE_LIBSANDBOX
31 sandbox_LDADD = $(top_builddir)/librcutil/librcutil.la
32 sandbox_SOURCES = \
33 sandbox.c \
34 sandbox.h \
35 sandbox_utils.c \
36 $(LOCAL_INCLUDES)
37
38 libsandbox.c: libsandbox.map symbols.h
39
40 SYMBOLS_FILE = $(srcdir)/symbols.h.in
41 SYMBOLS_LIST = $(shell $(EGREP) -v '^\#' $(SYMBOLS_FILE))
42 GEN_VERSION_MAP_SCRIPT = $(top_srcdir)/scripts/gen_symbol_version_map.awk
43 GEN_HEADER_SCRIPT = $(top_srcdir)/scripts/gen_symbol_header.awk
44
45 libsandbox.map: $(SYMBOLS_FILE) $(GEN_VERSION_MAP_SCRIPT)
46 @echo "Generating $@"; \
47 if [ ! -e "$(LIBC_PATH)" ]; then\
48 echo -e "\n*** Cannot find LIBC_PATH '$(LIBC_PATH)' !\n"; \
49 exit 1; \
50 fi; \
51 export SYMBOLS="$(SYMBOLS_LIST)"; \
52 if ! $(READELF) -s $(LIBC_PATH) | \
53 $(AWK) -f $(GEN_VERSION_MAP_SCRIPT) > $@ ; \
54 then \
55 echo "\n*** Failed to generate '$@' !\n"; \
56 exit 1; \
57 fi
58
59 symbols.h: $(SYMBOLS_FILE) $(GEN_HEADER_SCRIPT)
60 @echo "Generating $@"; \
61 if [ ! -e "$(LIBC_PATH)" ]; then\
62 echo -e "\n*** Cannot find LIBC_PATH '$(LIBC_PATH)' !\n"; \
63 exit 1; \
64 fi; \
65 export SYMBOLS="$(SYMBOLS_LIST)"; \
66 if ! $(READELF) -s $(LIBC_PATH) | \
67 $(AWK) -f $(GEN_HEADER_SCRIPT) > $@ ; \
68 then \
69 echo "\n*** Failed to generate '$@' !\n"; \
70 exit 1; \
71 fi
72
73 EXTRA_DIST = $(SYMBOLS_FILE)
74
75 CLEANFILES = libsandbox.map symbols.h
76 DISTCLEANFILES = $(CLEANFILES)

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20