| 1 |
# Copyright (C) 2025 Free Software Foundation, Inc. |
| 2 |
# Contributed by the Symas Corporation, 2025 |
| 3 |
|
| 4 |
# This file is part of GCC. |
| 5 |
|
| 6 |
# GCC is free software; you can redistribute it and/or modify |
| 7 |
# it under the terms of the GNU General Public License as published by |
| 8 |
# the Free Software Foundation; either version 3, or (at your option) |
| 9 |
# any later version. |
| 10 |
|
| 11 |
# GCC is distributed in the hope that it will be useful, |
| 12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
# GNU General Public License for more details. |
| 15 |
|
| 16 |
# You should have received a copy of the GNU General Public License |
| 17 |
# along with GCC; see the file COPYING3. If not see |
| 18 |
# <http://www.gnu.org/licenses/>. |
| 19 |
|
| 20 |
# Written de novo for libgcobol. |
| 21 |
|
| 22 |
AUTOMAKE_OPTIONS = 1.8 foreign |
| 23 |
ACLOCAL_AMFLAGS = -I .. -I ../config |
| 24 |
|
| 25 |
# May be used by various substitution variables. |
| 26 |
gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) |
| 27 |
|
| 28 |
# Skip the whole process if we are not building libgcobol. |
| 29 |
if BUILD_LIBGCOBOL |
| 30 |
toolexeclib_LTLIBRARIES = libgcobol.la |
| 31 |
toolexeclib_DATA = libgcobol.spec |
| 32 |
|
| 33 |
## |
| 34 |
## 2.2.12 Automatic Dependency Tracking |
| 35 |
## Automake generates code for automatic dependency tracking by default |
| 36 |
## |
| 37 |
libgcobol_la_SOURCES = \ |
| 38 |
charmaps.cc \ |
| 39 |
constants.cc \ |
| 40 |
gfileio.cc \ |
| 41 |
gmath.cc \ |
| 42 |
intrinsic.cc \ |
| 43 |
io.cc \ |
| 44 |
libgcobol.cc \ |
| 45 |
valconv.cc |
| 46 |
|
| 47 |
WARN_CFLAGS = -W -Wall -Wwrite-strings |
| 48 |
|
| 49 |
AM_CPPFLAGS = -I. -I$(srcdir) $(LIBQUADINCLUDE) |
| 50 |
AM_CFLAGS = $(XCFLAGS) |
| 51 |
AM_CXXFLAGS = $(XCFLAGS) |
| 52 |
AM_CXXFLAGS += $(WARN_CFLAGS) |
| 53 |
AM_CXXFLAGS += -DIN_TARGET_LIBS |
| 54 |
AM_CXXFLAGS += -fno-strict-aliasing |
| 55 |
|
| 56 |
if ENABLE_DARWIN_AT_RPATH |
| 57 |
# Handle embedded rpaths for Darwin. |
| 58 |
extra_ldflags_libgcobol += -Wc,-nodefaultrpaths |
| 59 |
extra_ldflags_libgcobol += -Wl,-rpath,@loader_path |
| 60 |
endif |
| 61 |
|
| 62 |
# We want to link with the c++ runtime. |
| 63 |
libgcobol_la_LINK = $(CXXLINK) $(libgcobol_la_LDFLAGS) |
| 64 |
version_arg = -version-info $(LIBGCOBOL_VERSION) |
| 65 |
libgcobol_la_LDFLAGS = $(LTLDFLAGS) $(LIBQUADLIB) $(LTLIBICONV) \ |
| 66 |
$(extra_ldflags_libgcobol) $(LIBS) $(version_arg) |
| 67 |
libgcobol_la_DEPENDENCIES = libgcobol.spec $(LIBQUADLIB_DEP) |
| 68 |
|
| 69 |
endif BUILD_LIBGCOBOL |