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

Contents of /trunk/libsandbox/Makefile.am

Parent Directory Parent Directory | Revision Log Revision Log


Revision 339 - (show annotations) (download)
Thu Jul 13 15:25:38 2006 UTC (8 years, 5 months ago) by azarah
File size: 2288 byte(s)
Add back using libsbutil.a, else libsandbox.so increase currently with at least 3kb.

1 AUTOMAKE_OPTIONS = foreign
2
3 lib_LTLIBRARIES = libsandbox.la
4
5 AM_CPPFLAGS = \
6 $(SANDBOX_DEFINES) \
7 -DPIC -fPIC -D_REENTRANT \
8 -I$(top_srcdir) -Wall
9
10 INCLUDES = \
11 -I$(top_srcdir)/libsbutil \
12 -I$(top_srcdir)/libsbutil/include
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 # Could use the following to libsandbox_la_LIBADD, but then libtool links it
18 # with --whole-archive, and libsandbox.so increase with a few KB in size:
19 # $(top_builddir)/libsbutil/libsbutil.la
20 libsandbox_la_LIBSBLIB = $(top_builddir)/libsbutil/.libs/libsbutil.a
21 libsandbox_la_LIBADD = \
22 -lc $(LIBDL) \
23 $(libsandbox_la_LIBSBLIB)
24 # Do not add -nostdlib or -nostartfiles, as then our constructor
25 # and destructor will not be executed ...
26 libsandbox_la_LDFLAGS = \
27 -nodefaultlibs \
28 -Wl,--version-script,libsandbox.map
29 libsandbox_la_SOURCES = \
30 libsandbox.h \
31 libsandbox.c \
32 wrappers.h \
33 wrappers.c \
34 canonicalize.c
35
36 libsandbox.c: libsandbox.map symbols.h
37
38 SYMBOLS_FILE = $(srcdir)/symbols.h.in
39 SYMBOLS_LIST = $(shell $(EGREP) -v '^\#' $(SYMBOLS_FILE))
40 SYMBOLS_WRAPPERS = $(wildcard $(srcdir)/wrapper-funcs/*.c)
41 GEN_VERSION_MAP_SCRIPT = $(top_srcdir)/scripts/gen_symbol_version_map.awk
42 GEN_HEADER_SCRIPT = $(top_srcdir)/scripts/gen_symbol_header.awk
43
44 libsandbox.map: $(SYMBOLS_FILE) $(GEN_VERSION_MAP_SCRIPT)
45 @echo "Generating $@"; \
46 if [ ! -e "$(LIBC_PATH)" ]; then\
47 echo -e "\n*** Cannot find LIBC_PATH '$(LIBC_PATH)' !\n"; \
48 exit 1; \
49 fi; \
50 export SYMBOLS="$(SYMBOLS_LIST)"; \
51 if ! $(READELF) -h -s $(LIBC_PATH) | \
52 $(AWK) -f $(GEN_VERSION_MAP_SCRIPT) > $@ ; \
53 then \
54 echo "\n*** Failed to generate '$@' !\n"; \
55 exit 1; \
56 fi
57
58 symbols.h: $(SYMBOLS_FILE) $(SYMBOLS_WRAPPERS) $(GEN_HEADER_SCRIPT)
59 @echo "Generating $@"; \
60 if [ ! -e "$(LIBC_PATH)" ]; then\
61 echo -e "\n*** Cannot find LIBC_PATH '$(LIBC_PATH)' !\n"; \
62 exit 1; \
63 fi; \
64 export SYMBOLS="$(SYMBOLS_LIST)"; \
65 if ! $(READELF) -h -s $(LIBC_PATH) | \
66 $(AWK) -f $(GEN_HEADER_SCRIPT) > $@ ; \
67 then \
68 echo "\n*** Failed to generate '$@' !\n"; \
69 exit 1; \
70 fi
71
72 EXTRA_DIST = $(SYMBOLS_FILE) $(SYMBOLS_WRAPPERS)
73
74 CLEANFILES = libsandbox.map symbols.h
75 DISTCLEANFILES = $(CLEANFILES)

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20