c++: accepts-invalid with =delete("") [PR111840]
[official-gcc.git] / libgm2 / libm2iso / Makefile.am
blob933f694987997042b76f650e473e2a58286fa0a2
1 # Makefile for libm2iso.
2 #   Copyright 2013-2022  Free Software Foundation, Inc.
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.
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.
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/>.
18 SUFFIXES = .c .cc .mod .def .o .obj .lo .a .la
20 ACLOCAL_AMFLAGS = -I .. -I ../config
22 VPATH = . @srcdir@ @srcdir@/../../gcc/m2/gm2-libs-iso
24 # Multilib support.
25 MAKEOVERRIDES=
27 gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
29 # Directory in which the compiler finds libraries etc.
30 libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)
31 # Used to install the shared libgcc.
32 # was slibdir = @slibdir@
33 slibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)
35 toolexeclibdir=@toolexeclibdir@
36 toolexecdir=@toolexecdir@
37 GM2_FOR_TARGET=@GM2_FOR_TARGET@
39 MULTIDIR := $(shell $(CC) $(CFLAGS) -print-multi-directory)
40 MULTIOSDIR := $(shell $(CC) $(CFLAGS) -print-multi-os-directory)
42 MULTIOSSUBDIR := $(shell if test x$(MULTIOSDIR) != x.; then echo /$(MULTIOSDIR); fi)
43 inst_libdir = $(libsubdir)$(MULTISUBDIR)
44 inst_slibdir = $(slibdir)$(MULTIOSSUBDIR)
46 # Work around what appears to be a GNU make bug handling MAKEFLAGS
47 # values defined in terms of make variables, as is the case for CC and
48 # friends when we are called from the top level Makefile.
49 AM_MAKEFLAGS = \
50         "GCC_DIR=$(GCC_DIR)" \
51         "GM2_SRC=$(GM2_SRC)" \
52         "AR_FLAGS=$(AR_FLAGS)" \
53         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
54         "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
55         "GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \
56         "CFLAGS=$(CFLAGS)" \
57         "CXXFLAGS=$(CXXFLAGS)" \
58         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
59         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
60         "INSTALL=$(INSTALL)" \
61         "INSTALL_DATA=$(INSTALL_DATA)" \
62         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
63         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
64         "LDFLAGS=$(LDFLAGS)" \
65         "LIBCFLAGS=$(LIBCFLAGS)" \
66         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
67         "MAKE=$(MAKE)" \
68         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
69         "MULTISUBDIR=$(MULTISUBDIR)" \
70         "MULTIOSDIR=$(MULTIOSDIR)" \
71         "MULTIBUILDTOP=$(MULTIBUILDTOP)" \
72         "MULTIFLAGS=$(MULTIFLAGS)" \
73         "PICFLAG=$(PICFLAG)" \
74         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
75         "SHELL=$(SHELL)" \
76         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
77         "exec_prefix=$(exec_prefix)" \
78         "infodir=$(infodir)" \
79         "libdir=$(libdir)" \
80         "includedir=$(includedir)" \
81         "prefix=$(prefix)" \
82         "tooldir=$(tooldir)" \
83         "gxx_include_dir=$(gxx_include_dir)" \
84         "AR=$(AR)" \
85         "AS=$(AS)" \
86         "LD=$(LD)" \
87         "RANLIB=$(RANLIB)" \
88         "NM=$(NM)" \
89         "NM_FOR_BUILD=$(NM_FOR_BUILD)" \
90         "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
91         "DESTDIR=$(DESTDIR)" \
92         "WERROR=$(WERROR)" \
93         "TARGET_LONGDOUBLE_ABI=$(TARGET_LONGDOUBLE_ABI)" \
94         "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)"
96 # Subdir rules rely on $(FLAGS_TO_PASS)
97 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
100 if BUILD_ISOLIB
101 M2DEFS = ChanConsts.def  CharClass.def \
102          ClientSocket.def  ComplexMath.def \
103          ConvStringLong.def  ConvStringReal.def \
104          ConvTypes.def  COROUTINES.def \
105          ErrnoCategory.def  EXCEPTIONS.def \
106          GeneralUserExceptions.def  IOChan.def \
107          IOConsts.def  IOLink.def \
108          IOResult.def  LongComplexMath.def \
109          LongConv.def  LongIO.def \
110          LongMath.def  LongStr.def \
111          LongWholeIO.def  LowLong.def \
112          LowReal.def  LowShort.def \
113          M2EXCEPTION.def  M2RTS.def \
114          MemStream.def \
115          Preemptive.def \
116          Processes.def  ProgramArgs.def \
117          RandomNumber.def \
118          RawIO.def  RealConv.def \
119          RealIO.def  RealMath.def \
120          RealStr.def  RndFile.def \
121          RTco.def \
122          RTdata.def  RTentity.def \
123          RTfio.def  RTgen.def \
124          RTgenif.def  RTio.def \
125          Semaphores.def  SeqFile.def \
126          ShortComplexMath.def \
127          ShortIO.def  ShortWholeIO.def \
128          SimpleCipher.def  SIOResult.def \
129          SLongIO.def  SLongWholeIO.def \
130          SRawIO.def  SRealIO.def \
131          SShortIO.def  SShortWholeIO.def \
132          StdChans.def  STextIO.def \
133          Storage.def  StreamFile.def \
134          StringChan.def  Strings.def \
135          SWholeIO.def  SysClock.def \
136          SYSTEM.def  TermFile.def \
137          TERMINATION.def  TextIO.def \
138          TextUtil.def \
139          WholeConv.def  WholeIO.def \
140          WholeStr.def  wrapclock.def \
141          wrapsock.def wraptime.def
143 M2MODS = ChanConsts.mod  CharClass.mod \
144          ClientSocket.mod  ComplexMath.mod \
145          ConvStringLong.mod  ConvStringReal.mod \
146          ConvTypes.mod  COROUTINES.mod \
147          EXCEPTIONS.mod  GeneralUserExceptions.mod \
148          IOChan.mod  IOConsts.mod \
149          IOLink.mod  IOResult.mod \
150          LongComplexMath.mod  LongConv.mod \
151          LongIO.mod  LongMath.mod \
152          LongStr.mod  LongWholeIO.mod \
153          LowLong.mod  LowReal.mod \
154          LowShort.mod  M2EXCEPTION.mod \
155          M2RTS.mod  MemStream.mod \
156          Preemptive.mod \
157          Processes.mod \
158          ProgramArgs.mod  RandomNumber.mod \
159          RawIO.mod  RealConv.mod \
160          RealIO.mod  RealMath.mod \
161          RealStr.mod  RndFile.mod \
162          RTdata.mod  RTentity.mod \
163          RTfio.mod  RTgenif.mod \
164          RTgen.mod  RTio.mod \
165          Semaphores.mod  SeqFile.mod \
166          ShortComplexMath.mod \
167          ShortIO.mod  ShortWholeIO.mod \
168          SimpleCipher.mod  SIOResult.mod \
169          SLongIO.mod  SLongWholeIO.mod \
170          SRawIO.mod  SRealIO.mod \
171          SShortIO.mod  SShortWholeIO.mod \
172          StdChans.mod  STextIO.mod \
173          Storage.mod  StreamFile.mod \
174          StringChan.mod  Strings.mod \
175          SWholeIO.mod  SysClock.mod \
176          SYSTEM.mod  TermFile.mod \
177          TERMINATION.mod  TextIO.mod \
178          TextUtil.mod \
179          WholeConv.mod  WholeIO.mod \
180          WholeStr.mod
182 toolexeclib_LTLIBRARIES = libm2iso.la
183 libm2iso_la_SOURCES =  $(M2MODS) \
184                      ErrnoCategory.cc RTco.cc wrapclock.cc wraptime.cc wrapsock.c
185 #  wrapsock.cc
187 C_INCLUDES = -I.. -I$(toplevel_srcdir)/libiberty -I$(toplevel_srcdir)/include
189 libm2isodir = libm2iso
190 libm2iso_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2iso_la_SOURCES)))
191 libm2iso_la_CFLAGS = \
192    $(C_INCLUDES) -I. -I.. -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs \
193    -DBUILD_GM2_LIBS -I@srcdir@/../ -I../../../gcc -I$(GCC_DIR) -I$(GCC_DIR)/../include \
194    -I../../libgcc -I$(GCC_DIR)/../libgcc -I$(MULTIBUILDTOP)../../gcc/include \
195    $(TARGET_LONGDOUBLE_ABI)
196 libm2iso_la_M2FLAGS = \
197   -fm2-pathname=m2iso -I. -Ilibm2iso -I$(GM2_SRC)/gm2-libs-iso \
198   -fm2-pathname=m2pim -I$(GM2_SRC)/gm2-libs \
199   -fiso -fextended-opaque -fm2-g -g -Wcase-enum -Wreturn-type -fcase -fm2-prefix=m2iso \
200    $(TARGET_LONGDOUBLE_ABI)
201 if TARGET_DARWIN
202 libm2iso_la_link_flags = -Wl,-undefined,dynamic_lookup
203 else
204 libm2iso_la_link_flags =
205 endif
206 libm2iso_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2iso_la_link_flags)
207 CLEANFILES = SYSTEM.def
208 BUILT_SOURCES = SYSTEM.def
210 M2LIBDIR = /m2/m2iso/
212 M2HEADER_FILES = m2rts.h
214 SYSTEM.def: Makefile
215         bash $(GM2_SRC)/tools-src/makeSystem -fiso \
216              $(GM2_SRC)/gm2-libs-iso/SYSTEM.def \
217              $(GM2_SRC)/gm2-libs-iso/SYSTEM.mod \
218              -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs \
219              "$(GM2_FOR_TARGET)" $@
221 .mod.lo:
222         $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
223                    $(GM2_FOR_TARGET) -c \
224                    $(CFLAGS_FOR_TARGET) $(LIBCFLAGS) $(libm2iso_la_M2FLAGS) $< -o $@
226 .cc.lo:
227         $(LIBTOOL) --tag=CXX --mode=compile $(CXX) -c -I$(srcdir) \
228                    $(CXXFLAGS) $(LIBCFLAGS) $(libm2iso_la_CFLAGS) $< -o $@
230 .c.lo:
231         $(LIBTOOL) --tag=CC --mode=compile $(CC) -c -I$(srcdir) \
232                    $(CFLAGS) $(LIBCFLAGS) $(libm2iso_la_CFLAGS) $< -o $@
234 install-data-local: force
235         mkdir -p $(DESTDIR)$(inst_libdir)/$(M2LIBDIR)
236         for i in $(M2DEFS) $(M2MODS) ; do \
237            if [ -f $$i ] ; then \
238               $(INSTALL_DATA) $$i '$(DESTDIR)$(inst_libdir)/$(M2LIBDIR)'; \
239            elif [ -f @srcdir@/../../gcc/m2/gm2-libs-iso/$$i ] ; then \
240               $(INSTALL_DATA) @srcdir@/../../gcc/m2/gm2-libs-iso/$$i '$(DESTDIR)$(inst_libdir)/$(M2LIBDIR)'; \
241            else \
242               echo "cannot find $$i" ; exit 1 ; \
243            fi ; \
244            chmod 644 $(DESTDIR)$(inst_libdir)/$(M2LIBDIR)$$i ; \
245         done
246         for i in $(M2HEADER_FILES) ; do \
247            if [ -f @srcdir@/$$i ] ; then \
248               $(INSTALL_DATA) @srcdir@/$$i '$(DESTDIR)$(inst_libdir)/$(M2LIBDIR)'; \
249            else \
250               echo "cannot find $$i" ; exit 1 ; \
251            fi ; \
252            chmod 644 $(DESTDIR)$(inst_libdir)/$(M2LIBDIR)$$i ; \
253         done
255 force:
257 endif