VERSION = 2.7.4
RWINLIB = ../windows/harfbuzz-$(VERSION)

CXX_STD = CXX11

PKG_CPPFLAGS = \
	-I${RWINLIB}/include/freetype2

PKG_LIBS = -L${RWINLIB}/lib${R_ARCH} \
	-lfreetype -lpng -lz

OBJECTS = caches.o cpp11.o dev_metrics.o font_matching.o font_registry.o \
	ft_cache.o string_shape.o font_metrics.o font_fallback.o string_metrics.o \
	emoji.o cache_store.o init.o win/FontManagerWindows.o

all: clean winlibs

winlibs:
	"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R" ${VERSION}

clean:
	rm -f $(OBJECTS) $(SHLIB)
