.SILENT: FLAGS_DIR := $(dir $(lastword $(MAKEFILE_LIST))) SELF_DIR = $(dir $@) export RM = rm export CP = cp export AR1 := x86_64-w64-mingw32-ar export AS1 := x86_64-w64-mingw32-as export CC1 := x86_64-w64-mingw32-cc export CXX1 := x86_64-w64-mingw32-c++ export LD1 := x86_64-w64-mingw32-cc export AR = echo " AR $<" && $(AR1) export AS = echo " AS $^" && $(AS1) export CC = echo " CC $^" && $(CC1) export CXX = echo " CXX $^" && $(CXX1) export LD = echo " LD $@" && $(LD1) export FASM = echo " FASM $^" && fasm >/dev/null # halt&cache fire if windows ifneq (, $(findstring mingw,$(shell $(CC1) -dumpmachine))) export Platform_CXXFLAGS := export Platform_LDFLAGS := -L$(FLAGS_DIR)/easyx/lib64 export Platform_LDLIBS := -leasyx -lgdi32 -limm32 -lwinmm -lopengl32 export Platform_INCLUDEFLAGS := -I$(FLAGS_DIR)/easyx/include else export Platform_CXXFLAGS := export Platform_LDFLAGS := export Platform_LDLIBS := export Platform_INCLUDEFLAGS := endif export INCLUDEFLAGS := $(Platform_INCLUDEFLAGS) export CPPFLAGS = -DWIN32_LEAN_AND_MEAN export CFLAGS = $(INCLUDEFLAGS) $(BUILD_OPTIONS) -Wno-attributes -g export CXXFLAGS = $(INCLUDEFLAGS) -DHELOS $(BUILD_OPTIONS) $(Platform_CXXFLAGS) -Wno-unused-result -std=c++17 -g export LDFLAGS = $(Platform_LDFLAGS) -g export LDLIBS = $(Platform_LDLIBS) -lm -lstdc++ # Pattern rule for FASM assembly %.o: %.S $(FASM) $^ $@