summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschodet2007-07-27 12:53:27 +0000
committerschodet2007-07-27 12:53:27 +0000
commit94e3ac0472916929d36923cd5e7b271138971c64 (patch)
treeee72206a803429b007dc065d13ff7edb63207602
parent7bbadb2b77ed7ed02b21ca4b9384fb3d11631e30 (diff)
Simplified maximus Makefiles.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@555 017c9cb6-072f-447c-8318-d5b54f68fe89
-rw-r--r--common/make/default.mk4
-rw-r--r--maximus/Module4
-rw-r--r--maximus/coreengine/Makefile6
-rw-r--r--maximus/coreengine/Module4
-rw-r--r--maximus/coreengine/test/Makefile6
-rw-r--r--maximus/coreengine/test/Module1
-rw-r--r--maximus/error/Module4
-rw-r--r--maximus/functioncall/Module4
-rw-r--r--maximus/networkclock/Module4
-rw-r--r--maximus/phy/Module4
-rw-r--r--maximus/sci/Module4
-rw-r--r--maximus/system/Module4
-rw-r--r--maximus/unittest/Makefile13
13 files changed, 45 insertions, 17 deletions
diff --git a/common/make/default.mk b/common/make/default.mk
index e6112614b7..5ddddc90a6 100644
--- a/common/make/default.mk
+++ b/common/make/default.mk
@@ -10,7 +10,7 @@ HOST_CFLAGS := $(EXTRA_HOST_CFLAGS) -g $(call isdebug,,-O2) -finline -W -Wall -W
HOST_ASFLAGS := $(HOST_CFLAGS)
HOST_CXXFLAGS := $(HOST_CFLAGS)
HOST_LDFLAGS := $(EXTRA_HOST_LDFLAGS)
-HOST_LDLIBS :=
+HOST_LDLIBS := $(EXTRA_HOST_LDLIBS)
TARGET_INCLUDES := $(TARGET_INCLUDES:%=-I$(BASE)/%) $(INCLUDES)
TARGET_DEFS := $(TARGET_DEFS) $(DEFS)
@@ -19,6 +19,6 @@ TARGET_CFLAGS := $(EXTRA_TARGET_CFLAGS) -g $(call isdebug,,-O2) -finline -W -Wal
TARGET_ASFLAGS := $(TARGET_CFLAGS)
TARGET_CXXFLAGS := $(TARGET_CFLAGS)
TARGET_LDFLAGS := $(EXTRA_TARGET_LDFLAGS)
-TARGET_LDLIBS :=
+TARGET_LDLIBS := $(EXTRA_TARGET_LDLIBS)
Q = @@
diff --git a/maximus/Module b/maximus/Module
new file mode 100644
index 0000000000..56344a7862
--- /dev/null
+++ b/maximus/Module
@@ -0,0 +1,4 @@
+MODULES := maximus/error maximus/functioncall \
+ maximus/networkclock maximus/phy maximus/sci maximus/system
+HOST_INCLUDES += maximus/common/interfaces maximus/common/types
+EXTRA_HOST_LDLIBS += -lpthread
diff --git a/maximus/coreengine/Makefile b/maximus/coreengine/Makefile
index 26fb582dc7..13e714523d 100644
--- a/maximus/coreengine/Makefile
+++ b/maximus/coreengine/Makefile
@@ -2,9 +2,7 @@ BASE = ../..
HOST_PROGRAMS = maximus
maximus_SOURCES = main.cpp CoreEngine.cpp
-maximus_MODULES = maximus/error maximus/functioncall maximus/networkclock maximus/phy maximus/sci maximus/system
-INCLUDES = maximus/error/inc maximus/coreengine/inc maximus/networkclock/inc maximus/sci/inc maximus/functioncall/inc maximus/phy/inc maximus/system/inc maximus/common/interfaces maximus/common/types
+maximus_MODULES = maximus
+HOST_INCLUDES = maximus/coreengine/inc
include $(BASE)/common/make/top.mk
-
-HOST_LDFLAGS += -lpthread
diff --git a/maximus/coreengine/Module b/maximus/coreengine/Module
index f75daf22fb..85be21e9c5 100644
--- a/maximus/coreengine/Module
+++ b/maximus/coreengine/Module
@@ -1 +1,5 @@
SOURCES := CoreEngine.cpp
+ifdef UNITTEST
+SOURCES += CoreEngineTest.cpp
+endif
+HOST_INCLUDES += maximus/coreengine/inc
diff --git a/maximus/coreengine/test/Makefile b/maximus/coreengine/test/Makefile
index fc225150df..db35450c58 100644
--- a/maximus/coreengine/test/Makefile
+++ b/maximus/coreengine/test/Makefile
@@ -2,9 +2,7 @@ BASE = ../../..
HOST_PROGRAMS = maximustest
maximustest_SOURCES = main.cpp CoreEngine.cpp TestExample.cpp
-maximustest_MODULES = maximus/error maximus/functioncall maximus/networkclock maximus/phy maximus/sci maximus/system
-INCLUDES = maximus/error/inc maximus/coreengine/test/inc maximus/networkclock/inc maximus/sci/inc maximus/functioncall/inc maximus/phy/inc maximus/system/inc maximus/common/interfaces maximus/common/types
+maximustest_MODULES = maximus
+HOST_INCLUDES = maximus/coreengine/test/inc
include $(BASE)/common/make/top.mk
-
-HOST_LDFLAGS += -lpthread
diff --git a/maximus/coreengine/test/Module b/maximus/coreengine/test/Module
deleted file mode 100644
index 959c700253..0000000000
--- a/maximus/coreengine/test/Module
+++ /dev/null
@@ -1 +0,0 @@
-SOURCES := CoreEngine.cpp TestExample.cpp
diff --git a/maximus/error/Module b/maximus/error/Module
index ee96de663a..6521537a9f 100644
--- a/maximus/error/Module
+++ b/maximus/error/Module
@@ -1 +1,5 @@
SOURCES := Error.cpp
+ifdef UNITTEST
+SOURCES += ErrorTest.cpp
+endif
+HOST_INCLUDES += maximus/error/inc
diff --git a/maximus/functioncall/Module b/maximus/functioncall/Module
index 3519101a56..04a85526a0 100644
--- a/maximus/functioncall/Module
+++ b/maximus/functioncall/Module
@@ -1 +1,5 @@
SOURCES := FunctionCallManager.cpp FunctionSciMsg.cpp FunctionCallParameter.cpp
+ifdef UNITTEST
+SOURCES += FunctionCallManagerTest.cpp FunctionSciMsgTest.cpp IFunctionCallTest.cpp
+endif
+HOST_INCLUDES += maximus/functioncall/inc
diff --git a/maximus/networkclock/Module b/maximus/networkclock/Module
index 91954c2ee2..b164897ea3 100644
--- a/maximus/networkclock/Module
+++ b/maximus/networkclock/Module
@@ -1 +1,5 @@
SOURCES := ClockSciMsg.cpp NetworkClockEvt.cpp NetworkClockEvtList.cpp NetworkClockProcessor.cpp
+ifdef UNITTEST
+SOURCES += NetworkClockProcessorTest.cpp NetworkClockEvtListTest.cpp NetworkClockEvtTest.cpp
+endif
+HOST_INCLUDES += maximus/networkclock/inc
diff --git a/maximus/phy/Module b/maximus/phy/Module
index 4fbbf48898..b98ee5e148 100644
--- a/maximus/phy/Module
+++ b/maximus/phy/Module
@@ -1 +1,5 @@
SOURCES := PhyProcessor.cpp PhySciMsg.cpp
+ifdef UNITTEST
+SOURCES += PhyProcessorTest.cpp PhySciMsgTest.cpp
+endif
+HOST_INCLUDES += maximus/phy/inc
diff --git a/maximus/sci/Module b/maximus/sci/Module
index cb8b430284..b9b574b21c 100644
--- a/maximus/sci/Module
+++ b/maximus/sci/Module
@@ -1 +1,5 @@
SOURCES := SciMsg.cpp SciServer.cpp
+ifdef UNITTEST
+SOURCES += SciServerTest.cpp SciMsgTest.cpp
+endif
+HOST_INCLUDES += maximus/sci/inc
diff --git a/maximus/system/Module b/maximus/system/Module
index e6c8048757..e911dbaf21 100644
--- a/maximus/system/Module
+++ b/maximus/system/Module
@@ -1 +1,5 @@
SOURCES := Station.cpp StationConfiguration.cpp SystemManager.cpp SystemSciMsg.cpp
+ifdef UNITTEST
+SOURCES += SystemManagerTest.cpp StationTest.cpp StationConfigurationTest.cpp SystemSciMsgTest.cpp
+endif
+HOST_INCLUDES += maximus/system/inc
diff --git a/maximus/unittest/Makefile b/maximus/unittest/Makefile
index 404e516846..7cd4b8ae21 100644
--- a/maximus/unittest/Makefile
+++ b/maximus/unittest/Makefile
@@ -1,11 +1,12 @@
BASE = ../..
-CPPUNIT_PATH=/opt/cppunit
+UNITTEST = y
+
HOST_PROGRAMS = unittest
-unittest_SOURCES = main.cpp ../../coreengine/src/CoreEngineTest.cpp ../../networkclock/src/NetworkClockProcessorTest.cpp ../../networkclock/src/NetworkClockEvtListTest.cpp ../../networkclock/src/NetworkClockEvtTest.cpp ../../sci/src/SciServerTest.cpp ../../sci/src/SciMsgTest.cpp ../../system/src/SystemManagerTest.cpp ../../system/src/StationTest.cpp ../../system/src/StationConfigurationTest.cpp ../../functioncall/src/FunctionCallManagerTest.cpp ../../functioncall/src/FunctionSciMsgTest.cpp ../../functioncall/src/IFunctionCallTest.cpp ../../error/src/ErrorTest.cpp ../../phy/src/PhyProcessorTest.cpp ../../system/src/SystemSciMsgTest.cpp ../../phy/src/PhySciMsgTest.cpp
-unittest_MODULES = maximus/error maximus/functioncall maximus/networkclock maximus/phy maximus/sci maximus/system maximus/coreengine
-INCLUDES = maximus/error/inc maximus/coreengine/inc maximus/networkclock/inc maximus/sci/inc maximus/functioncall/inc maximus/phy/inc maximus/system/inc maximus/common/interfaces maximus/common/types
+unittest_SOURCES = main.cpp
+unittest_MODULES = maximus maximus/coreengine
-include $(BASE)/common/make/top.mk
+EXTRA_HOST_CFLAGS := $(shell cppunit-config --cflags)
+EXTRA_HOST_LDLIBS := $(shell cppunit-config --libs)
-HOST_LDFLAGS += -L${CPPUNIT_PATH}/lib -lstdc++ -lcppunit -ldl -lpthread
+include $(BASE)/common/make/top.mk