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

Contents of /trunk/src/Makefile.am

Parent Directory Parent Directory | Revision Log Revision Log


Revision 81 - (hide annotations) (download)
Tue May 10 07:10:50 2005 UTC (13 years, 3 months ago) by azarah
Original Path: trunk/Makefile.am
File size: 1749 byte(s)
Really remove libctest.c

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