From 78c8b43b9cae1aa38ba3b2d8fdd462856d622a7c Mon Sep 17 00:00:00 2001 From: liuhaitao Date: Tue, 25 Feb 2020 11:17:47 +0800 Subject: [PATCH] libs/libxx: add .cpp files build support libcxx project has .cpp files inside, so add .cpp files build support here. Change-Id: Icd3bcb42f4ceafa5e07a9977149cb08d555a9ade Signed-off-by: liuhaitao --- libs/libxx/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/libxx/Makefile b/libs/libxx/Makefile index b3230c1a32..f155eb65fb 100644 --- a/libs/libxx/Makefile +++ b/libs/libxx/Makefile @@ -83,9 +83,10 @@ endif AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) +CPPOBJS = $(CPPSRCS:.cpp=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) +SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) $(CPPSRCS) +OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) $(CPPOBJS) BIN = libxx$(LIBEXT) @@ -101,6 +102,9 @@ $(COBJS): %$(OBJEXT): %.c $(CXXOBJS): %$(OBJEXT): %.cxx $(call COMPILEXX, $<, $@) +$(CPPOBJS): %$(OBJEXT): %.cpp + $(call COMPILEXX, $<, $@) + $(BIN): $(OBJS) $(call ARCHIVE, $@, $(OBJS))