# These definitions are for some future R version
# when this file is used instead of Makevars.ucrt:

PKG_CPPFLAGS = \
	-DHAVE_PNG_H -DHAVE_FREETYPE -DR_NO_REMAP -Iext -Iext/ftgl -Iext/glad/include \
	-I$(LOCAL_SOFT)/include/freetype2 -Iext/earcut \
	-DRGL_W32

PKG_LIBS = \
	-lfreetype -lharfbuzz -lfreetype -lpng -lbz2 -lz -lgdi32 -lopengl32 -lglu32
	
# These definitions are for older R versions:

@HIDE_IF_R42PLUS@ VERSION = 2.10.4
@HIDE_IF_R42PLUS@ RWINLIB = ../windows/freetype-$(VERSION)

@HIDE_IF_R42PLUS@ CXX_STD = CXX11

@HIDE_IF_R42PLUS@ PKG_CPPFLAGS = \
@HIDE_IF_R42PLUS@	-DHAVE_PNG_H -DHAVE_FREETYPE -DR_NO_REMAP -Iext -Iext/ftgl \
@HIDE_IF_R42PLUS@	-I$(RWINLIB)/include -I$(RWINLIB)/include/freetype2 \
@HIDE_IF_R42PLUS@	-Iext/glad/include -Iext/earcut 

@HIDE_IF_R42PLUS@ PKG_LIBS = -L$(RWINLIB)/lib$(R_ARCH) \
@HIDE_IF_R42PLUS@	-lfreetype -lpng -lz -lgdi32 -lopengl32 -lglu32

@HIDE_IF_R42PLUS@all: winlibs $(SHLIB)

@HIDE_IF_R42PLUS@$(SHLIB): winlibs

@HIDE_IF_R42PLUS@winlibs:
@HIDE_IF_R42PLUS@	"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R" $(VERSION)
@HIDE_IF_R42PLUS@	sed -e "s^@RGL_NO_OPENGL@^FALSE^" ../R/noOpenGL.R.in > ../R/noOpenGL.R

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