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

Contents of /trunk/Makefile.am

Parent Directory Parent Directory | Revision Log Revision Log


Revision 38 - (show annotations) (download)
Mon Mar 14 16:00:45 2005 UTC (9 years, 1 month ago) by genone
File size: 1730 byte(s)
dropping duplicate symbols

1 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
2 EXTRA_DIST = sandbox.bashrc canonicalize.c libctest.c symbols.in
3 CLEANFILES = symbols.h
4
5 AM_CPPFLAGS = -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT \
6 -DLIBC_VERSION=\"$(LIBC_VERSION)\" \
7 -DLIBSANDBOX_PATH=\"$(libdir)\" \
8 -DSANDBOX_BASHRC_PATH=\"$(pkgdatadir)\"
9
10 dist_pkgdata_DATA = sandbox.bashrc
11
12 lib_LTLIBRARIES = libsandbox.la
13 libsandbox_la_SOURCES = libsandbox.c sandbox_futils.c localdecls.h
14 # Do not add -nostdlib or -nostartfiles, as then our constructor
15 # and destructor will not be executed ...
16 libsandbox_la_LDFLAGS = -nodefaultlibs -lc -ldl
17 # We need -fexceptions here, else we do not catch exceptions
18 # (nptl/tst-cancelx4.c in glibc among others fails for wrapped functions).
19 libsandbox_la_CFLAGS = -fexceptions
20
21 bin_PROGRAMS = sandbox
22 sandbox_SOURCES = sandbox.c sandbox.h sandbox_futils.c getcwd.c
23 sandbox_CFLAGS = -DOUTSIDE_LIBSANDBOX
24
25 libsandbox.c: symbols.h
26
27 # Basically generates symbols.h from the function names in symbols.in.
28 # Not sure if we can count on the latest version the only symbol
29 # countaining '@@' ...
30 symbols.h: symbols.in
31 @echo "Generating $@"; \
32 if [ ! -e "$(LIBC_PATH)" ]; then\
33 echo -e "\n*** Cannot find $(LIBC_PATH)!\n"; \
34 exit 1; \
35 fi; \
36 echo "#ifndef __symbol_h" > $@; \
37 echo -e "#define __symbol_h\n" >> $@; \
38 for x in `cat $^`; do \
39 sym=`readelf -s "$(LIBC_PATH)" 2>/dev/null | \
40 awk '{ print $$8 }' | \
41 grep "^$${x}@@" | \
42 sort -u | \
43 cut -d'@' -f3`; \
44 echo "#define symname_$${x} \"$${x}\"" >> $@; \
45 if [ -n "$${sym}" ]; then \
46 echo "#define symver_$${x} \"$${sym}\"" >> $@; \
47 else \
48 echo "#define symver_$${x} NULL" >> $@; \
49 fi; \
50 done; \
51 echo -e "\n#endif /* __symbol_h */" >> $@

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20