utf8proc

A clean C library for processing UTF-8 Unicode data
git clone https://git.sinitax.com/juliastrings/utf8proc
Log | Files | Refs | README | LICENSE | sfeed.txt

Makefile (920B)


      1CURL=curl
      2
      3CC = cc
      4CFLAGS ?= -O2
      5CFLAGS += -std=c99 -pedantic -Wall
      6
      7all: bench
      8
      9LIBUTF8PROC = ../utf8proc.o
     10
     11bench: bench.o util.o $(LIBUTF8PROC)
     12	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ bench.o util.o $(LIBUTF8PROC)
     13
     14DATAURL = https://raw.githubusercontent.com/duerst/eprun/master/benchmark
     15DATAFILES = Deutsch_.txt Japanese_.txt Korean_.txt Vietnamese_.txt
     16
     17$(DATAFILES):
     18	$(CURL) -O $(DATAURL)/$@
     19
     20bench.out: $(DATAFILES) bench
     21	./bench -nfkc $(DATAFILES) > $@
     22
     23# you may need make CPPFLAGS=... LDFLAGS=... to help it find ICU
     24icu: icu.o util.o
     25	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ icu.o util.o -licuuc
     26
     27icu.out: $(DATAFILES) icu
     28	./icu $(DATAFILES) > $@
     29
     30unistring: unistring.o util.o
     31	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ unistring.o util.o -lunistring
     32
     33unistring.out: $(DATAFILES) unistring
     34	./unistring $(DATAFILES) > $@
     35
     36.c.o:
     37	$(CC) $(CPPFLAGS) -I.. $(CFLAGS) -c -o $@ $<
     38
     39clean:
     40	rm -rf *.o *.txt bench *.out icu unistring