Index: buildsys.mk.in ================================================================== --- buildsys.mk.in +++ buildsys.mk.in @@ -25,10 +25,11 @@ CXX = @CXX@ CPP = @CPP@ DC = @DC@ ERLC = @ERLC@ OBJC = @OBJC@ +OBJCXX = @OBJCXX@ AR = @AR@ LD = ${CC} RANLIB = @RANLIB@ PYTHON = @PYTHON@ CFLAGS = @CFLAGS@ @@ -35,10 +36,11 @@ CXXFLAGS = @CXXFLAGS@ CPPFLAGS = @CPPFLAGS@ DFLAGS = @DFLAGS@ ERLCFLAGS = @ERLCFLAGS@ OBJCFLAGS = @OBJCFLAGS@ +OBJCXXFLAGS = @OBJCXXFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ PYTHON_FLAGS = @PYTHON_FLAGS@ PROG_IMPLIB_NEEDED = @PROG_IMPLIB_NEEDED@ PROG_IMPLIB_LDFLAGS = @PROG_IMPLIB_LDFLAGS@ @@ -77,17 +79,18 @@ OBJS2 = ${OBJS1:.cc=.o} OBJS3 = ${OBJS2:.cxx=.o} OBJS4 = ${OBJS3:.d=.o} OBJS5 = ${OBJS4:.erl=.beam} OBJS6 = ${OBJS5:.m=.o} -OBJS7 = ${OBJS6:.py=.pyc} -OBJS8 = ${OBJS7:.xpm=.o} -OBJS += ${OBJS8:.po=.gmo} +OBJS7 = ${OBJS6:.mm=.o} +OBJS8 = ${OBJS7:.py=.pyc} +OBJS9 = ${OBJS8:.xpm=.o} +OBJS += ${OBJS9:.po=.gmo} .SILENT: .SUFFIXES: -.SUFFIXES: .beam .c .cc .cxx .d .dep .erl .gmo .m .o .po .py .pyc .xpm +.SUFFIXES: .beam .c .cc .cxx .d .dep .erl .gmo .m .mm .o .po .py .pyc .xpm .PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean all: for i in subdirs depend ${STATIC_LIB} ${STATIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST}; do \ ${MAKE} ${MFLAGS} $$i || exit 1; \ @@ -120,10 +123,14 @@ ;; \ *.m) \ test $$i -nt .deps && regen=1; \ deps="$$deps $${i%.m}.dep"; \ ;; \ + *.mm) \ + test $$i -nt .deps && regen=1; \ + deps="$$deps $${i%.mm}.dep"; \ + ;; \ esac; \ done; \ if test x"$$regen" = x"1" -a x"$$deps" != "x"; then \ ${DEPEND_STATUS}; \ if ${MAKE} ${MFLAGS} $$deps && cat $$deps >.deps; then \ @@ -134,11 +141,11 @@ touch -t 0001010000 .deps; \ ${DEPEND_FAILED}; \ fi; \ fi -.c.dep .cc.dep .cxx.dep .m.dep: +.c.dep .cc.dep .cxx.dep .m.dep .mm.dep: ${CPP} ${CPPFLAGS} -M $< >$@ || (rm -f $@; exit 1) .d.dep: .xpm.dep: @@ -226,10 +233,18 @@ .m.o: ${COMPILE_STATUS} if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ ${COMPILE_OK}; \ + else \ + ${COMPILE_FAILED}; \ + fi + +.mm.o: + ${COMPILE_STATUS} + if ${OBJCXX} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ + ${COMPILE_OK}; \ else \ ${COMPILE_FAILED}; \ fi .po.gmo: