#
#  Terminal
#  by John Ryland
#  Copyright (c) 2023
#

include 3rdparty/glfw.pro
include 3rdparty/freetype.pro

TARGET         = Terminal
VERSION        = 0.9.8
BRIEF          = "Terminal"

ROOT_DIR       = ../..
MODULES_DIR    = .modules
CXXFLAGS       = -std=c++17 -fno-rtti -Os -s -fPIC # -static

FA_SRC_DIR     = $(MODULES_DIR)/Font-Awesome
IMGUI_SRC_DIR  = $(MODULES_DIR)/imgui
NODES_SRC_DIR  = $(MODULES_DIR)/imgui-node-editor

FA_DIR         = $(ROOT_DIR)/$(FA_SRC_DIR)
FT2_DIR        = $(ROOT_DIR)/$(FT2_INC_DIR)
FW_DIR         = $(ROOT_DIR)/$(FW_SRC_DIR)
GLFW_DIR       = $(ROOT_DIR)/$(GLFW_INC_DIR)
IFCH_DIR       = $(ROOT_DIR)/$(IFCH_SRC_DIR)
IMGUI_DIR      = $(ROOT_DIR)/$(IMGUI_SRC_DIR)
MODS_DIR       = $(ROOT_DIR)/$(MODULES_DIR)
NODES_DIR      = $(ROOT_DIR)/$(NODES_SRC_DIR)

INCLUDES       = ./ \
                 ../Tools \
                 ../Framework \
                 ../Views \
                 ../Vulkan \
                 ../EditorUI \
                 $(NODES_DIR)/external/stb_image \
                 $(FA_DIR) \
                 $(FT2_DIR) \
                 $(FW_DIR) \
                 $(GLFW_DIR) \
                 $(IFCH_DIR) \
                 $(IMGUI_DIR) \
                 $(MODS_DIR)
    
SOURCES        = ../Framework/Acknowledgements.cpp \
                 ../Framework/Application.cpp \
                 ../Framework/GlfwWindowSystem.cpp \
                 ../Framework/GlfwVulkanSurface.cpp \
                 ../Framework/GlfwPlatform.cpp \
                 ../Framework/Image.cpp \
                 ../Framework/DearImGuiUiSystem.cpp \
                 ../Framework/VulkanRenderer.cpp \
                 ../Framework/Window.cpp \
                 ../Vulkan/VulkanBuffer.cpp \
                 ../Vulkan/VulkanCommandPool.cpp \
                 ../Vulkan/VulkanDepthBuffer.cpp \
                 ../Vulkan/VulkanDevice.cpp \
                 ../Vulkan/VulkanFramebuffer.cpp \
                 ../Vulkan/VulkanImageBuffer.cpp \
                 ../Vulkan/VulkanPipeline.cpp \
                 ../Vulkan/VulkanRenderPass.cpp \
                 ../Vulkan/VulkanShader.cpp \
                 ../Vulkan/VulkanSurface.cpp \
                 ../Vulkan/VulkanSwapChain.cpp \
                 ../Vulkan/VulkanTexture.cpp \
                 ../Views/TerminalView.cpp \
                 TerminalEmulator.cpp \
                 TerminalProcess.cpp \
                 Terminal.cpp \
                 TerminalWindow.cpp \
                 $(IMGUI_DIR)/imgui.cpp \
                 $(IMGUI_DIR)/imgui_draw.cpp \
                 $(IMGUI_DIR)/imgui_tables.cpp \
                 $(IMGUI_DIR)/imgui_widgets.cpp \
		         $(IMGUI_DIR)/misc/freetype/imgui_freetype.cpp

TMP=		 $(IMGUI_DIR)/imgui_demo.cpp \
    
# LIBS           = -lz -lpng -lharfbuzz $(FT2_LIB) $(GLFW_LIB) -lvulkan -lpng -lharfbuzz -lz
# LIBS           = $(FT2_LIB) $(GLFW_LIB) -lvulkan -lharfbuzz -lpng -lz
# LIBS           = $(FT2_LIB) $(GLFW_LIB) -lvulkan
LIBS           = -lglfw -lvulkan -lfreetype

# $(TARGET_BIN): $(FT2_LIB) $(GLFW_LIB)


