1 ## Makefile for the toplevel directory of the libssp library.
3 ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
4 ## Free Software Foundation, Inc.
7 AUTOMAKE_OPTIONS = 1.9.5 foreign
8 ACLOCAL_AMFLAGS = -I .. -I ../config
11 # May be used by various substitution variables.
12 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
15 if LIBSSP_USE_SYMVER_GNU
16 version_arg = -Wl,--version-script=$(srcdir)/ssp.map
17 version_dep = $(srcdir)/ssp.map
19 if LIBSSP_USE_SYMVER_SUN
20 version_arg = -Wl,-M,ssp.map-sun
21 version_dep = ssp.map-sun
22 ssp.map-sun : $(srcdir)/ssp.map \
23 $(top_srcdir)/../contrib/make_sunver.pl \
24 $(libssp_la_OBJECTS) $(libssp_la_LIBADD)
25 perl $(top_srcdir)/../contrib/make_sunver.pl \
27 $(libssp_la_OBJECTS:%.lo=.libs/%.o) \
28 `echo $(libssp_la_LIBADD) | \
29 sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
30 > $@ || (rm -f $@ ; exit 1)
39 toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la
41 target_noncanonical = @target_noncanonical@
42 libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include
43 nobase_libsubinclude_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h
46 ssp.c gets-chk.c memcpy-chk.c memmove-chk.c mempcpy-chk.c \
47 memset-chk.c snprintf-chk.c sprintf-chk.c stpcpy-chk.c \
48 strcat-chk.c strcpy-chk.c strncat-chk.c strncpy-chk.c \
49 vsnprintf-chk.c vsprintf-chk.c
51 libssp_la_DEPENDENCIES = $(version_dep) $(libssp_la_LIBADD)
52 libssp_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
53 $(version_arg) -no-undefined -bindir "$(bindir)"
55 libssp_nonshared_la_SOURCES = \
57 libssp_nonshared_la_CFLAGS = -prefer-pic
58 libssp_nonshared_la_LIBADD =
59 libssp_nonshared_la_DEPENDENCIES = $(libssp_nonshared_la_LIBADD)
60 libssp_nonshared_la_LDFLAGS = -static
64 # From libffi/Makefile.am
66 # Work around what appears to be a GNU make bug handling MAKEFLAGS
67 # values defined in terms of make variables, as is the case for CC and
68 # friends when we are called from the top level Makefile.
70 "AR_FLAGS=$(AR_FLAGS)" \
71 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
73 "CXXFLAGS=$(CXXFLAGS)" \
74 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
75 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
76 "INSTALL=$(INSTALL)" \
77 "INSTALL_DATA=$(INSTALL_DATA)" \
78 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
79 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
80 "JC1FLAGS=$(JC1FLAGS)" \
81 "LDFLAGS=$(LDFLAGS)" \
82 "LIBCFLAGS=$(LIBCFLAGS)" \
83 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
85 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
86 "PICFLAG=$(PICFLAG)" \
87 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
89 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
90 "exec_prefix=$(exec_prefix)" \
91 "infodir=$(infodir)" \
94 "includedir=$(includedir)" \
100 "LIBCFLAGS=$(LIBCFLAGS)" \
102 "PICFLAG=$(PICFLAG)" \
108 ## ################################################################