@@ -8,7 +8,9 @@ INSTALL=install
88
99# compiler settings
1010CFLAGS ?= -O2
11- CFLAGS += -std=c99 -pedantic -Wall -fpic -DUTF8PROC_EXPORTS
11+ PICFLAG = -fPIC
12+ C99FLAG = -std=c99
13+ UCFLAGS = $(CFLAGS ) $(PICFLAG ) $(C99FLAG ) -DUTF8PROC_EXPORTS
1214
1315# shared-library version MAJOR.MINOR.PATCH ... this may be *different*
1416# from the utf8proc version number because it indicates ABI compatibility,
@@ -55,7 +57,7 @@ data/utf8proc_data.c.new: libutf8proc.$(SHLIB_EXT) data/data_generator.rb data/c
5557 $(MAKE ) -C data utf8proc_data.c.new
5658
5759utf8proc.o : utf8proc.h utf8proc.c utf8proc_data.c
58- $(CC ) $(CFLAGS ) -c -o utf8proc.o utf8proc.c
60+ $(CC ) $(UCFLAGS ) -c -o utf8proc.o utf8proc.c
5961
6062libutf8proc.a : utf8proc.o
6163 rm -f libutf8proc.a
@@ -96,25 +98,25 @@ data/GraphemeBreakTest.txt:
9698 $(MAKE ) -C data GraphemeBreakTest.txt
9799
98100test/normtest : test/normtest.c utf8proc.o utf8proc.h test/tests.h
99- $(CC ) $(CFLAGS ) test/normtest.c utf8proc.o -o $@
101+ $(CC ) $(UCFLAGS ) test/normtest.c utf8proc.o -o $@
100102
101103test/graphemetest : test/graphemetest.c utf8proc.o utf8proc.h test/tests.h
102- $(CC ) $(CFLAGS ) test/graphemetest.c utf8proc.o -o $@
104+ $(CC ) $(UCFLAGS ) test/graphemetest.c utf8proc.o -o $@
103105
104106test/printproperty : test/printproperty.c utf8proc.o utf8proc.h test/tests.h
105- $(CC ) $(CFLAGS ) test/printproperty.c utf8proc.o -o $@
107+ $(CC ) $(UCFLAGS ) test/printproperty.c utf8proc.o -o $@
106108
107109test/charwidth : test/charwidth.c utf8proc.o utf8proc.h test/tests.h
108- $(CC ) $(CFLAGS ) test/charwidth.c utf8proc.o -o $@
110+ $(CC ) $(UCFLAGS ) test/charwidth.c utf8proc.o -o $@
109111
110112test/valid : test/valid.c utf8proc.o utf8proc.h test/tests.h
111- $(CC ) $(CFLAGS ) test/valid.c utf8proc.o -o $@
113+ $(CC ) $(UCFLAGS ) test/valid.c utf8proc.o -o $@
112114
113115test/iterate : test/iterate.c utf8proc.o utf8proc.h test/tests.h
114- $(CC ) $(CFLAGS ) test/iterate.c utf8proc.o -o $@
116+ $(CC ) $(UCFLAGS ) test/iterate.c utf8proc.o -o $@
115117
116118test/case : test/case.c utf8proc.o utf8proc.h test/tests.h
117- $(CC ) $(CFLAGS ) test/case.c utf8proc.o -o $@
119+ $(CC ) $(UCFLAGS ) test/case.c utf8proc.o -o $@
118120
119121check : test/normtest data/NormalizationTest.txt test/graphemetest data/GraphemeBreakTest.txt test/printproperty test/case test/charwidth test/valid test/iterate bench/bench.c bench/util.c bench/util.h utf8proc.o
120122 $(MAKE ) -C bench
0 commit comments