From bc56198092724dc581c20a6010af04e1cde2933c Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 28 May 2025 05:28:51 +0200 Subject: [PATCH] port ceepeepee makefile support from blan incase we ever need it --- src/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index 8a0c94214..e995b3ccf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -192,8 +192,8 @@ include bluajit/Makefile.cfg include bluajit/Makefile.cfg2 endif -depends:=$(basename $(filter %.c %.s,$(sources))) -objects:=$(basename $(filter %.c %.s %.nas,$(sources))) +depends:=$(basename $(filter %.c %.cpp %.s,$(sources))) +objects:=$(basename $(filter %.c %.cpp %.s %.nas,$(sources))) depends:=$(depends:%=$(depdir)/%.d) @@ -267,10 +267,11 @@ opts+=$(debug_opts) opts+=$(foreach v,$(passthru_opts),$(if $($(v)),-D$(v))) opts+=$(WFLAGS) $(CPPFLAGS) $(CFLAGS) -libs+=$(LDFLAGS) +libs+=$(LDFLAGS) -lstdc++ asflags:=$(ASFLAGS) -x assembler-with-cpp cc=$(CC) +cxx=$(CXX) ifdef DISTCC cc=distcc $(CC) @@ -372,6 +373,7 @@ endif endef $(eval $(call _recipe,c)) +$(eval $(call _recipe,cpp)) $(eval $(call _recipe,s,$(asflags))) # compiling recipe template @@ -385,6 +387,7 @@ $(objdir)/%.$(1) : %.$(2) | $$$$(@D)/ endef $(eval $(call _recipe,o,c,$(cc) -c -o $$@ $$<)) +$(eval $(call _recipe,o,cpp,$(cxx) -c -o $$@ $$<)) $(eval $(call _recipe,o,s,$(cc) $(asflags) -c -o $$@ $$<)) $(eval $(call _recipe,res,rc,$(windres) -i $$< -o $$@))