Print

Print


Commit in slicPandora on MAIN
Makefile+17-151.8 -> 1.9
fix broken tests build

slicPandora
Makefile 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- Makefile	4 Mar 2010 21:44:55 -0000	1.8
+++ Makefile	9 Mar 2010 19:59:19 -0000	1.9
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.8 2010/03/04 21:44:55 jeremy Exp $
+# $Id: Makefile,v 1.9 2010/03/09 19:59:19 jeremy Exp $
 
 ifndef PANDORAPFA
 $(error Set PANDORAPFA env var to location of Pandora PFA New.)
@@ -36,6 +36,7 @@
 TESTOBJ=$(addsuffix .o, $(basename $(TESTSRCS)))
 TESTSCRIPT=$(PWD)/scripts/run_test.sh
 TESTRUN=$(addsuffix _run,$(TESTBINS))
+TESTS=$(basename $(notdir $(TESTSRCS)))
 
 # flags
 CXXFLAGS=-Wall -g $(INCLUDES)
@@ -46,13 +47,6 @@
 # Default target.
 .DEFAULT: all
 
-# No standalone binary is created for SlicPandora, just the library.
-# The test cases create binaries.  Leave target here for reference.  
-# --JM
-# Create a standalone binary.
-#bin: bindir
-#	@$(CXX) $(SRCS) $(CXXFLAGS) $(LIBS) -o $(PWD)/bin/$(BINNAME)
-
 # Create .o files from .cpp files.
 %.o: %.cpp
 	@echo "Compiling $< ..."; $(CXX) -c $(CXXFLAGS) -o $@ $<
@@ -72,14 +66,15 @@
 # Both lib targets in one.
 libs: lib shlib
 
-# Compile a test case.
-$(TESTBINS) : $(TESTSRCS)
-	@$(CXX) $< $(CXXFLAGS) $(TESTLIBS) -o $@
-
 # Compile all the tests.
-tests: bindir lib shlib
-	@echo $(TESTBINS); \
-	$(MAKE) -s $(TESTBINS)
+tests: libs FORCE $(TESTS)
+
+# Test program targets.
+$(TESTS): FORCE
+	@echo "Compiling $@ ..."; \
+	$(CXX) $(CXXFLAGS) $(TESTLIBS) -o ./bin/$@ $(PWD)[log in to unmask]
+
+FORCE:
 
 # Run a single test.  
 # These are named like ${BINNAME}_run to avoid conflicts with other targets.
@@ -107,3 +102,10 @@
 # Create the bin directory.
 bindir:
 	@mkdir -p $(PWD)/bin;
+
+# No standalone binary is created for SlicPandora, just the library.
+# The test cases create binaries.  Leave target here for reference.  
+# --JM
+# Create a standalone binary.
+#bin: bindir
+#	@$(CXX) $(SRCS) $(CXXFLAGS) $(LIBS) -o $(PWD)/bin/$(BINNAME)
CVSspam 0.2.8