Makefile.am 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. ## Makefile for the toplevel directory of the libssp library.
  2. ##
  3. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
  4. ## Free Software Foundation, Inc.
  5. ##
  6. AUTOMAKE_OPTIONS = 1.9.5 foreign
  7. ACLOCAL_AMFLAGS = -I .. -I ../config
  8. MAINT_CHARSET = latin1
  9. # May be used by various substitution variables.
  10. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
  11. if LIBSSP_USE_SYMVER
  12. if LIBSSP_USE_SYMVER_GNU
  13. version_arg = -Wl,--version-script=$(srcdir)/ssp.map
  14. version_dep = $(srcdir)/ssp.map
  15. endif
  16. if LIBSSP_USE_SYMVER_SUN
  17. version_arg = -Wl,-M,ssp.map-sun
  18. version_dep = ssp.map-sun
  19. ssp.map-sun : $(srcdir)/ssp.map \
  20. $(top_srcdir)/../contrib/make_sunver.pl \
  21. $(libssp_la_OBJECTS) $(libssp_la_LIBADD)
  22. perl $(top_srcdir)/../contrib/make_sunver.pl \
  23. $(srcdir)/ssp.map \
  24. $(libssp_la_OBJECTS:%.lo=.libs/%.o) \
  25. `echo $(libssp_la_LIBADD) | \
  26. sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
  27. > $@ || (rm -f $@ ; exit 1)
  28. endif
  29. else
  30. version_arg =
  31. version_dep =
  32. endif
  33. AM_CFLAGS = -Wall
  34. toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la
  35. target_noncanonical = @target_noncanonical@
  36. libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include
  37. nobase_libsubinclude_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h
  38. libssp_la_SOURCES = \
  39. ssp.c gets-chk.c memcpy-chk.c memmove-chk.c mempcpy-chk.c \
  40. memset-chk.c snprintf-chk.c sprintf-chk.c stpcpy-chk.c \
  41. strcat-chk.c strcpy-chk.c strncat-chk.c strncpy-chk.c \
  42. vsnprintf-chk.c vsprintf-chk.c
  43. libssp_la_LIBADD =
  44. libssp_la_DEPENDENCIES = $(version_dep) $(libssp_la_LIBADD)
  45. libssp_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
  46. $(version_arg) $(lt_host_flags)
  47. libssp_nonshared_la_SOURCES = \
  48. ssp-local.c
  49. libssp_nonshared_la_CFLAGS = -prefer-pic
  50. libssp_nonshared_la_LIBADD =
  51. libssp_nonshared_la_DEPENDENCIES = $(libssp_nonshared_la_LIBADD)
  52. libssp_nonshared_la_LDFLAGS = -static
  53. # XXX hack alert
  54. # From libffi/Makefile.am
  55. # Work around what appears to be a GNU make bug handling MAKEFLAGS
  56. # values defined in terms of make variables, as is the case for CC and
  57. # friends when we are called from the top level Makefile.
  58. AM_MAKEFLAGS = \
  59. "AR_FLAGS=$(AR_FLAGS)" \
  60. "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
  61. "CFLAGS=$(CFLAGS)" \
  62. "CXXFLAGS=$(CXXFLAGS)" \
  63. "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
  64. "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
  65. "INSTALL=$(INSTALL)" \
  66. "INSTALL_DATA=$(INSTALL_DATA)" \
  67. "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  68. "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
  69. "JC1FLAGS=$(JC1FLAGS)" \
  70. "LDFLAGS=$(LDFLAGS)" \
  71. "LIBCFLAGS=$(LIBCFLAGS)" \
  72. "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
  73. "MAKE=$(MAKE)" \
  74. "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
  75. "PICFLAG=$(PICFLAG)" \
  76. "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
  77. "SHELL=$(SHELL)" \
  78. "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
  79. "exec_prefix=$(exec_prefix)" \
  80. "infodir=$(infodir)" \
  81. "libdir=$(libdir)" \
  82. "prefix=$(prefix)" \
  83. "includedir=$(includedir)" \
  84. "AR=$(AR)" \
  85. "AS=$(AS)" \
  86. "CC=$(CC)" \
  87. "CXX=$(CXX)" \
  88. "LD=$(LD)" \
  89. "LIBCFLAGS=$(LIBCFLAGS)" \
  90. "NM=$(NM)" \
  91. "PICFLAG=$(PICFLAG)" \
  92. "RANLIB=$(RANLIB)" \
  93. "DESTDIR=$(DESTDIR)"
  94. MAKEOVERRIDES=
  95. ## ################################################################