| 1 |
# Makefile for libgm2. |
| 2 |
# Copyright 2013-2022 Free Software Foundation, Inc. |
| 3 |
# |
| 4 |
# This file is free software; you can redistribute it and/or modify |
| 5 |
# it under the terms of the GNU General Public License as published by |
| 6 |
# the Free Software Foundation; either version 3 of the License, or |
| 7 |
# (at your option) any later version. |
| 8 |
# |
| 9 |
# This program is distributed in the hope that it will be useful, |
| 10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
# GNU General Public License for more details. |
| 13 |
# |
| 14 |
# You should have received a copy of the GNU General Public License |
| 15 |
# along with this program; see the file COPYING3. If not see |
| 16 |
# <http://www.gnu.org/licenses/>. |
| 17 |
# |
| 18 |
# |
| 19 |
# if this file is changed then you need to run |
| 20 |
# |
| 21 |
# autoreconf2.64 |
| 22 |
# |
| 23 |
# Modula-2 support. |
| 24 |
AUTOMAKE_OPTIONS = 1.8 foreign |
| 25 |
|
| 26 |
SUFFIXES = .c .mod .def .o .obj .lo .a |
| 27 |
|
| 28 |
ACLOCAL_AMFLAGS = -I .. -I ../config |
| 29 |
|
| 30 |
# Multilib support. |
| 31 |
MAKEOVERRIDES= |
| 32 |
|
| 33 |
AM_CFLAGS = -I $(srcdir)/../libgcc -I $(MULTIBUILDTOP)../../gcc/include |
| 34 |
|
| 35 |
gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) |
| 36 |
TOP_GCCDIR := $(shell cd $(top_srcdir) && cd .. && pwd) |
| 37 |
|
| 38 |
GCC_DIR = $(TOP_GCCDIR)/gcc |
| 39 |
GM2_SRC = $(GCC_DIR)/m2 |
| 40 |
|
| 41 |
toolexeclibdir=@toolexeclibdir@ |
| 42 |
toolexecdir=@toolexecdir@ |
| 43 |
GM2_FOR_TARGET=@GM2_FOR_TARGET@ |
| 44 |
|
| 45 |
SUBDIRS = libm2min libm2log libm2cor libm2iso libm2pim |
| 46 |
GM2_BUILDDIR := $(shell pwd) |
| 47 |
gm2_cdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include |
| 48 |
|
| 49 |
if ENABLE_DARWIN_AT_RPATH |
| 50 |
DARWIN_AT_RPATH=yes |
| 51 |
else |
| 52 |
DARWIN_AT_RPATH=yes |
| 53 |
endif |
| 54 |
|
| 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 |
"GCC_DIR=$(GCC_DIR)" \ |
| 60 |
"GM2_SRC=$(GM2_SRC)" \ |
| 61 |
"AR_FLAGS=$(AR_FLAGS)" \ |
| 62 |
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \ |
| 63 |
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \ |
| 64 |
"GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \ |
| 65 |
"CFLAGS=$(CFLAGS)" \ |
| 66 |
"CXXFLAGS=$(CXXFLAGS)" \ |
| 67 |
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ |
| 68 |
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ |
| 69 |
"CFLAGS_LONGDOUBLE=$(CFLAGS_LONGDOUBLE)" \ |
| 70 |
"EXPECT=$(EXPECT)" \ |
| 71 |
"INSTALL=$(INSTALL)" \ |
| 72 |
"INSTALL_DATA=$(INSTALL_DATA)" \ |
| 73 |
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ |
| 74 |
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ |
| 75 |
"LDFLAGS=$(LDFLAGS)" \ |
| 76 |
"LIBCFLAGS=$(LIBCFLAGS)" \ |
| 77 |
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ |
| 78 |
"MAKE=$(MAKE)" \ |
| 79 |
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ |
| 80 |
"PICFLAG=$(PICFLAG)" \ |
| 81 |
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ |
| 82 |
"SHELL=$(SHELL)" \ |
| 83 |
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \ |
| 84 |
"exec_prefix=$(exec_prefix)" \ |
| 85 |
"infodir=$(infodir)" \ |
| 86 |
"libdir=$(libdir)" \ |
| 87 |
"includedir=$(includedir)" \ |
| 88 |
"prefix=$(prefix)" \ |
| 89 |
"tooldir=$(tooldir)" \ |
| 90 |
"gxx_include_dir=$(gxx_include_dir)" \ |
| 91 |
"AR=$(AR)" \ |
| 92 |
"AS=$(AS)" \ |
| 93 |
"LD=$(LD)" \ |
| 94 |
"RANLIB=$(RANLIB)" \ |
| 95 |
"NM=$(NM)" \ |
| 96 |
"NM_FOR_BUILD=$(NM_FOR_BUILD)" \ |
| 97 |
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \ |
| 98 |
"DESTDIR=$(DESTDIR)" \ |
| 99 |
"WERROR=$(WERROR)" \ |
| 100 |
"TARGET_LIB_PATH=$(TARGET_LIB_PATH)" \ |
| 101 |
"TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" \ |
| 102 |
"LIBTOOL=$(GM2_BUILDDIR)/libtool" \ |
| 103 |
"DARWIN_AT_RPATH=$(DARWIN_AT_RPATH)" |
| 104 |
|
| 105 |
# Subdir rules rely on $(FLAGS_TO_PASS) |
| 106 |
FLAGS_TO_PASS = $(AM_MAKEFLAGS) |
| 107 |
|
| 108 |
include $(top_srcdir)/../multilib.am |