You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
565 B

CFLAGS=-O2 -Wall $(shell pkgconf -cflags icu-io)
LDFLAGS=$(shell pkgconf -libs icu-io)
all: haskell-read-utf8 icu-read-utf8 bench
.PHONY: all
bench: haskell-read-utf8 icu-read-utf8
hyperfine ./haskell-read-utf8 ./icu-read-utf8
.PHONE: bench
haskell-read-utf8: ./haskell/HaskellReadUTF8.hs
ghc -o ./haskell-read-utf8 -O ./haskell/HaskellReadUTF8.hs
icu-read-utf8: ./icu/icu-read-utf8.c
$(CC) $(CFLAGS) $(LDFLAGS) ./icu/icu-read-utf8.c -o ./icu-read-utf8
rm -f ./haskell/*.{o,hi}
rm -f ./haskell-read-utf8
rm -f ./icu-read-utf8
.PHONY: clean