1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
Description: Some OSes stick to old gcc version but most of them have clang
instead (especially on macOS, it calls clang even if they specify gcc...).
We do not need to specify gcc as CC, it depends on build environment.
And set "-std=c99" is not good idea, since we can introduce more modern
standard versions (I've tested to build with clang-19 and set -std=c23 works.
We can use c23 now, see https://www.open-std.org/JTC1/SC22/WG14/ )
Index: unifont/src/Makefile
===================================================================
--- unifont.orig/src/Makefile
+++ unifont/src/Makefile
@@ -1,9 +1,6 @@
SHELL = /bin/sh
-CC = gcc
-C99 = $(CC) -std=c99
-
CFLAGS += -g -O2 -Wall
LOCALBINDIR = ../bin
@@ -44,16 +41,8 @@ PROGS = $(CPROGS) $(PPROGS)
all: $(CPROGS) bin
-#
-# Earlier Unifont C programs written before hex2otf follow C89 syntax.
-# hex2otf follows C99 syntax, so compile with a C99 flag for older gcc
-# versions. Notably, several platforms have remained with gcc 4.2.1
-# because it was the last version of gcc licensed under GPLv2. In
-# the future, the "-std=c99" flag could be added to the global CFLAGS
-# declaration at the beginning of this file.
-#
hex2otf: hex2otf.c hex2otf.h
- $(C99) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) hex2otf.c -o hex2otf
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) hex2otf.c -o hex2otf
unihexpose: unihexpose.o unifont-support.o
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) unihexpose.o unifont-support.o -o unihexpose
|