Fix test_cpp and c++ parallel build in Makefile.direct
authorIvan Maidanski <ivmai@mail.ru>
Mon, 20 Mar 2017 08:33:37 +0000 (11:33 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 20 Mar 2017 08:33:37 +0000 (11:33 +0300)
* Makefile.direct (test_cpp): Add dependency on c++ (and remove
dependency on base_lib and gc_cpp.o); do not link with gc_cpp.o
directly (it should be in gc.a).

Makefile.direct

index bf5c3b7..4af64fb 100644 (file)
@@ -253,10 +253,10 @@ cords: $(CORD_OBJS) cord/cordtest $(UTILS) base_lib
 gc_cpp.o: $(srcdir)/gc_cpp.cc $(srcdir)/include/gc_cpp.h $(srcdir)/include/gc.h
        $(CXX) -c $(CXXFLAGS) $(srcdir)/gc_cpp.cc
 
-test_cpp: $(srcdir)/tests/test_cpp.cc $(srcdir)/include/gc_cpp.h gc_cpp.o $(srcdir)/include/gc.h \
-  base_lib $(UTILS)
-       ./if_mach HP_PA HPUX $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc_cpp.o gc.a -ldld `./threadlibs`
-       ./if_not_there test_cpp $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc_cpp.o gc.a `./threadlibs`
+test_cpp: $(srcdir)/tests/test_cpp.cc $(srcdir)/include/gc_cpp.h $(srcdir)/include/gc.h c++ \
+  $(UTILS)
+       ./if_mach HP_PA HPUX $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc.a -ldld `./threadlibs`
+       ./if_not_there test_cpp $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc.a `./threadlibs`
 
 c++-t: c++ test_cpp
        ./test_cpp 1