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

Contents of /trunk/src/Makefile.am

Parent Directory Parent Directory | Revision Log Revision Log


Revision 190 - (hide annotations) (download)
Thu Dec 1 09:47:42 2005 UTC (12 years, 10 months ago) by azarah
File size: 2131 byte(s)
Rename src/symbols.in to src/symbols.h.in.
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     -D_GNU_SOURCE -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 37 # Do not add -nostdlib or -nostartfiles, as then our constructor
18     # and destructor will not be executed ...
19 azarah 183 libsandbox_la_LIBADD = -lc -ldl
20     libsandbox_la_LDFLAGS = \
21 azarah 185 -nodefaultlibs \
22 azarah 183 -Wl,--version-script,libsandbox.map
23     libsandbox_la_SOURCES = \
24 azarah 189 libsandbox.c \
25     getcwd.c \
26     canonicalize.c \
27     sandbox_futils.c \
28 azarah 183 $(LOCAL_INCLUDES)
29 ferringb 2
30 azarah 183 sandbox_CFLAGS = -DOUTSIDE_LIBSANDBOX
31     sandbox_SOURCES = \
32     sandbox.c \
33     sandbox.h \
34     sandbox_futils.c \
35     getcwd.c \
36     $(LOCAL_INCLUDES)
37 azarah 29
38 azarah 183 libsandbox.c: libsandbox.map symbols.h
39 azarah 29
40 azarah 190 SYMBOLS_FILE = $(srcdir)/symbols.h.in
41 azarah 183 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 azarah 29 @echo "Generating $@"; \
47 ferringb 33 if [ ! -e "$(LIBC_PATH)" ]; then\
48 vapier 52 echo -e "\n*** Cannot find LIBC_PATH '$(LIBC_PATH)' !\n"; \
49 azarah 29 exit 1; \
50     fi; \
51 azarah 183 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 azarah 189 EXTRA_DIST = $(SYMBOLS_FILE)
74 azarah 183
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