1SubDir HAIKU_TOP src tools cppunit ;
2
3AddSubDirSupportedPlatforms libbe_test ;
4
5UseHeaders [ FDirName $(HAIKU_TOP) headers tools elfsymbolpatcher ] : true ;
6UseCppUnitHeaders ;
7
8SEARCH_SOURCE += [ FDirName $(SUBDIR) cppunit ] ;
9
10{
11	DEFINES += BUILDING_CPPUNIT ;
12
13	if ( $(OS) != BEOS && $(OS) != HAIKU ) || $(OSPLAT) = PPC {
14		DEFINES += NO_ELF_SYMBOL_PATCHING ;
15	}
16}
17
18SharedLibrary libcppunit.so :
19	BTestCase.cpp
20	BTestSuite.cpp
21	SemaphoreSyncObject.cpp
22	TestApp.cpp
23	TestListener.cpp
24	TestShell.cpp
25	TestUtils.cpp
26	ThreadedTestCase.cpp
27
28	# cppunit
29	Asserter.cpp
30	CompilerOutputter.cpp
31	Exception.cpp
32	NotEqualException.cpp
33	RepeatedTest.cpp
34	SourceLine.cpp
35	SynchronizedObject.cpp
36	TestAssert.cpp
37	TestCase.cpp
38	TestFactoryRegistry.cpp
39	TestFailure.cpp
40	TestResult.cpp
41	TestResultCollector.cpp
42	TestRunner.cpp
43	TestSetUp.cpp
44	TestSucessListener.cpp
45	TestSuite.cpp
46	TextOutputter.cpp
47	TextTestProgressListener.cpp
48	TextTestResult.cpp
49	TypeInfoHelper.cpp
50	XmlOutputter.cpp
51	: be [ TargetLibstdc++ ]
52;
53
54if  ( $(OS) = BEOS || $(OS) = HAIKU ) && $(OSPLAT) != PPC {
55	LinkAgainst libcppunit.so : libelfsymbolpatcher.a debug ;
56}
57
58# To run the tests we need the cppunit library.
59{
60	local target = <src!tools!cppunit>libcppunit.so ;
61	MakeLocate $(target) : $(TARGET_UNIT_TEST_LIB_DIR) ;
62	RelSymLink $(target) : libcppunit.so ;
63	Depends libcppunit.so : $(target) ;
64}
65