[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 17d7660c 3/7: Begin to provide for compilers
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 17d7660c 3/7: Begin to provide for compilers other than gcc |
Date: |
Thu, 23 Jun 2022 18:33:52 -0400 (EDT) |
branch: master
commit 17d7660cbcd45a1ecb79fdae6d1a50f9a4b9eb93
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Begin to provide for compilers other than gcc
---
compiler.make | 31 +++++++++++++++++++++++++++++++
compiler_gcc.make | 2 +-
workhorse.make | 8 ++++----
3 files changed, 36 insertions(+), 5 deletions(-)
diff --git a/compiler.make b/compiler.make
new file mode 100644
index 00000000..c791bbba
--- /dev/null
+++ b/compiler.make
@@ -0,0 +1,31 @@
+# Include compiler-specific makefile.
+#
+# Copyright (C) 2022 Gregory W. Chicares.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+#
+# https://savannah.nongnu.org/projects/lmi
+# email: <gchicares@sbcglobal.net>
+# snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+
+ifeq (gcc,$(LMI_COMPILER))
+ compiler_makefile := compiler_gcc.make
+else ifeq (clang,$(LMI_COMPILER))
+ compiler_makefile := compiler_clang.make
+else
+ $(warning Untested compiler '$(LMI_COMPILER)')
+endif
+
+include $(srcdir)/$(compiler_makefile)
+$(srcdir)/$(compiler_makefile):: ;
diff --git a/compiler_gcc.make b/compiler_gcc.make
index a178777b..24a52a15 100644
--- a/compiler_gcc.make
+++ b/compiler_gcc.make
@@ -1,4 +1,4 @@
-# Compiler-specific makefile.
+# Compiler-specific makefile: gcc.
#
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Gregory W. Chicares.
#
diff --git a/workhorse.make b/workhorse.make
index b6beb6ee..af2237fd 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -79,14 +79,14 @@ $(srcdir)/objects.make:: ;
# Compiler.
#
-# Include this after 'objects.make' so that, for each compiler, it can
-# specify target-specific variables for simply-expanded lists of
+# Include this after 'objects.make', so compiler-specific makefiles
+# can specify target-specific variables for simply-expanded lists of
# object files defined in 'objects.make', e.g.:
# cgi_objects := ... [objects.make]
# $(cgicc_objects): gcc_warnings += ... [compiler_gcc.make]
-include $(srcdir)/compiler_gcc.make
-$(srcdir)/compiler_gcc.make:: ;
+include $(srcdir)/compiler.make
+$(srcdir)/compiler.make:: ;
################################################################################
- [lmi-commits] [lmi] master updated (adc56d25 -> 6030d119), Greg Chicares, 2022/06/23
- [lmi-commits] [lmi] master 6030d119 7/7: Prepare to support clang, Greg Chicares, 2022/06/23
- [lmi-commits] [lmi] master 24a5a5db 2/7: Punctuate 'e.g.' and 'i.e.' consistently, Greg Chicares, 2022/06/23
- [lmi-commits] [lmi] master f90190e4 1/7: Clearly mark an alternative as unimplemented, Greg Chicares, 2022/06/23
- [lmi-commits] [lmi] master 1461f1b1 5/7: Assume cygwin is like other msw platforms, Greg Chicares, 2022/06/23
- [lmi-commits] [lmi] master 17d7660c 3/7: Begin to provide for compilers other than gcc,
Greg Chicares <=
- [lmi-commits] [lmi] master 76ab8c12 4/7: Eschew magic values, Greg Chicares, 2022/06/23
- [lmi-commits] [lmi] master 0fc04fea 6/7: Refactor, Greg Chicares, 2022/06/23