lmi-commits
[Top][All Lists]
Advanced

[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:: ;
 
 
################################################################################
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]