[omniORB] C++ suffix .C throughout?

Vasily Tchekalkin Bacek@yandex-team.ru
Tue Jul 16 18:35:01 2002


Alexy Khrabrov wrote:
> Greetings -- seems that the elaborate makefile system is tailored
> specifically to .cc suffix.  What is the besti, most parameterized
> way to make it work for all .C files?  Or even a mix?

I just patch $(TOP)/mk/beforeauto.mk.in file. Like this.

---
@@ -607,6 +611,12 @@
  # The pattern rules below ensure that the right compiler flags are used
  # to compile the source for the library.

+static/%.o: %.cpp
+       $(CXX) -c $(CXXFLAGS) -o $@ $<
+
+shared/%.o: %.cpp
+       $(CXX) -c $(SHAREDLIB_CPPFLAGS) $(CXXFLAGS)  -o $@ $<
+
  static/%.o: %.cc
         $(CXX) -c $(CXXFLAGS) -o $@ $<

@@ -631,6 +641,9 @@
  %.o: %.cc
         $(CXX) -c $(CXXFLAGS) -o $@ $<

+%.o: %.cpp
+       $(CXX) -c $(CXXFLAGS) -o $@ $<
+

 
###########################################################################
#
---


-- 
Vasily Tchekalkin.
Bacek@yandex-team.ru
Yandex development team.