
#ifeq ($(PLATFORM),Windows)
#  GENERATOR=-G "MinGW Makefiles"
#endif

GLFW_LIB=$(OUTPUT_DIR)/install/usr/local/lib/libglfw3.a
# GLFW_LIB=$(OUTPUT_DIR)/install/usr/local/lib/glfw3.lib

# $(GLFW_LIB):
#	if [ ! -d $(OUTPUT_DIR)/glfw ] ; then  mkdir -p $(OUTPUT_DIR)/glfw && cd $(OUTPUT_DIR)/glfw && cmake -D CMAKE_C_FLAGS="-s -Os -static" -D CMAKE_CXX_FLAGS="-s -Os -static" ../../../.modules/glfw $(GENERATOR); fi
#	cd $(OUTPUT_DIR)/glfw && cmake --build . --config $(BUILD_TYPE) && cmake --install . --prefix ../install/usr/local --config $(BUILD_TYPE)

$(GLFW_LIB):
	if [ ! -d $(OUTPUT_DIR)/glfw ] ; then  mkdir -p $(OUTPUT_DIR)/glfw && cd $(OUTPUT_DIR)/glfw && cmake ../../../.modules/glfw -DCMAKE_SYSTEM_NAME="$(PLATFORM)"; fi
	cd $(OUTPUT_DIR)/glfw && cmake --build . --config $(BUILD_TYPE) && cmake --install . --prefix ../install/usr/local --config $(BUILD_TYPE)


build: $(GLFW_LIB)


GLFW_SRC_DIR  = .modules/glfw
GLFW_INC_DIR  = $(OUTPUT_DIR)/install/usr/local/include
