| 1 |
# Makefile for sources/connection/ |
| 2 |
# Satofumi KAMIMURA |
| 3 |
# $Id$ |
| 4 |
|
| 5 |
# Compile options |
| 6 |
CC = ${CXX} |
| 7 |
CXXFLAGS = -g -O0 -Wall -Werror ${INCLUDES} `sdl-config --cflags` |
| 8 |
INCLUDES = -I../common |
| 9 |
LDFLAGS = |
| 10 |
LDLIBS = |
| 11 |
|
| 12 |
# Target |
| 13 |
CONNECTION_LIB = connection.a |
| 14 |
TARGET = ${CONNECTION_LIB} |
| 15 |
|
| 16 |
all : ${TARGET} |
| 17 |
|
| 18 |
clean : |
| 19 |
${RM} ${TARGET} *.o allTest |
| 20 |
|
| 21 |
depend : |
| 22 |
makedepend -Y -- ${INCLUDES} -- ${wildcard *.h *.cpp} |
| 23 |
|
| 24 |
test : all allTest |
| 25 |
./allTest |
| 26 |
|
| 27 |
.PHONY : all clean depend test |
| 28 |
###################################################################### |
| 29 |
${CONNECTION_LIB} : \ |
| 30 |
${CONNECTION_LIB}(SerialCtrl.o) \ |
| 31 |
${CONNECTION_LIB}(NetInit.o) \ |
| 32 |
${CONNECTION_LIB}(UdpipCtrl.o) \ |
| 33 |
${CONNECTION_LIB}(TcpipCtrl.o) \ |
| 34 |
${CONNECTION_LIB}(TcpipAccept.o) \ |
| 35 |
${CONNECTION_LIB}(SocketSet.o) \ |
| 36 |
${CONNECTION_LIB}(ConnectionLogger.o) \ |
| 37 |
${CONNECTION_LIB}(ConnectionDeviceSearch.o) \ |
| 38 |
${CONNECTION_LIB}(FindComPorts.o) |
| 39 |
|
| 40 |
SerialCtrl.o : ${wildcard SerialCtrl_*.cpp} SerialCtrl.h ConnectionInterface.h |
| 41 |
# if test "${OSTYPE}" = "linux" -o "${OSTYPE}" = "linux-gnu" ; then \ |
| 42 |
# ${CXX} ${CXXFLAGS} SerialCtrl_lin.cpp -c -o $@; \ |
| 43 |
# else \ |
| 44 |
# ${CXX} ${CXXFLAGS} SerialCtrl_win.cpp -c -o $@; \ |
| 45 |
# fi; |
| 46 |
|
| 47 |
REQUIRE_LIBS = ../common/common.a |
| 48 |
|
| 49 |
${REQUIRE_LIBS} : |
| 50 |
cd ${@D}/ && ${MAKE} ${@F} |
| 51 |
|
| 52 |
allTest.o : ../unittest/allTest.cpp |
| 53 |
${CXX} ${CXXFLAGS} `cppunit-config --cflags` $< -c -o $@ |
| 54 |
|
| 55 |
TEST_OBJS = allTest.o TestCompile.o TestTcpipCtrl.o TestSocketSet.o TestConnectionDeviceSearch.o TestUdpipCtrl.o ${CONNECTION_LIB} ${REQUIRE_LIBS} |
| 56 |
TEST_LIBS = -lSDL_net |
| 57 |
|
| 58 |
allTest : ${TEST_OBJS} |
| 59 |
${CXX} ${CXXFLAGS} ${TEST_OBJS} -o $@ `cppunit-config --libs` ${TEST_LIBS} |
| 60 |
|
| 61 |
# DO NOT DELETE |
| 62 |
|
| 63 |
ConnectionLogger.o: ConnectionInterface.h |
| 64 |
SerialCtrl.o: ConnectionInterface.h |
| 65 |
TcpipCtrl.o: ConnectionInterface.h |
| 66 |
UdpipCtrl.o: ConnectionInterface.h |
| 67 |
ConnectionDeviceSearch.o: ConnectionDeviceSearch.h ProductIdHandler.h |
| 68 |
ConnectionLogger.o: ConnectionLogger.h ConnectionInterface.h TcpipCtrl.h |
| 69 |
FindComPorts.o: FindComPorts.h ../common/DetectOS.h |
| 70 |
NetInit.o: ../common/SdlInit.h NetInit.h |
| 71 |
SerialCtrl.o: ../common/DetectOS.h SerialCtrl_lin.cpp SerialCtrl.h |
| 72 |
SerialCtrl.o: ConnectionInterface.h ../common/RingBuffer.h |
| 73 |
SerialCtrl_lin.o: SerialCtrl.h ConnectionInterface.h ../common/RingBuffer.h |
| 74 |
SerialCtrl_win.o: SerialCtrl.h ConnectionInterface.h ../common/RingBuffer.h |
| 75 |
SocketSet.o: SocketSet.h TcpipCtrl.h ConnectionInterface.h |
| 76 |
TcpipAccept.o: TcpipAccept.h TcpipCtrl.h ConnectionInterface.h NetInit.h |
| 77 |
TcpipAccept.o: ../common/LogManager.h |
| 78 |
TcpipCtrl.o: TcpipCtrl.h ConnectionInterface.h SocketSet.h |
| 79 |
TcpipCtrl.o: ../common/RingBuffer.h NetInit.h |
| 80 |
TestCompile.o: TestCompile.h SerialCtrl.h ConnectionInterface.h |
| 81 |
TestConnectionDeviceSearch.o: TestConnectionDeviceSearch.h |
| 82 |
TestConnectionDeviceSearch.o: ConnectionDeviceSearch.h |
| 83 |
TestSocketSet.o: TestSocketSet.h SocketSet.h TcpipCtrl.h |
| 84 |
TestSocketSet.o: ConnectionInterface.h TcpipAccept.h |
| 85 |
TestSocketSet.o: ../common/ThreadCreator.h |
| 86 |
TestTcpipCtrl.o: TestTcpipCtrl.h TcpipCtrl.h ConnectionInterface.h |
| 87 |
TestTcpipCtrl.o: TcpipAccept.h ../common/ThreadCreator.h |
| 88 |
TestUdpipCtrl.o: TestUdpipCtrl.h UdpipCtrl.h ConnectionInterface.h |
| 89 |
UdpipCtrl.o: UdpipCtrl.h ConnectionInterface.h NetInit.h |