bench-my-utf8/Makefile

23 lines
565 B
Makefile

CFLAGS=-O2 -Wall $(shell pkgconf -cflags icu-io)
LDFLAGS=$(shell pkgconf -libs icu-io)
CC=gcc
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
clean:
rm -f ./haskell/*.{o,hi}
rm -f ./haskell-read-utf8
rm -f ./icu-read-utf8
.PHONY: clean