Files
core_make/tjp/Make/Makefile.build_pch
Timothy Prepscius 46185db8f0 flatten 20260225
2026-02-25 12:34:54 -05:00

38 lines
746 B
Makefile
Executable File

###################################
# License: Modified MIT (NON-AI)
# Copyright 2025 Timothy Prepscius
# See the LICENSE file in the root directory for license information.
###################################
SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
ifneq ($(strip $(PCH)),)
PCH_OUT := $(OBJPATH)/Precompile.pch.gch
############################
# USE dependencies
ifeq ($(USE_DEPENDENCIES),1)
PCH_DEPS := $(PCH_OUT:%.gch=%.d)
$(info $$PCH_OUT is [${PCH_OUT}])
#$(info $$PCH_DEPS is [${PCH_DEPS}])
-include $(PCH_DEPS)
endif
$(PCH_OUT): $(PCH)
-@mkdir -p $(dir $@)
@while [ ! -e $(dir $@) ]; do sleep 0.1; done
$(CPP) $(INCPATH) $(BUILD_PCH_FLAGS) $(_FLAGS) $(CPPFLAGS) $< -o $@
lib : $(PCH_OUT)
else
lib:
endif
build: lib