1 ENDIANESS
=OSC_HOST_LITTLE_ENDIAN
7 CXXFLAGS
= -fPIC
-DPIC
$(COPTS
) $(INCLUDES
) -D
$(ENDIANESS
)
10 INSTALL
= /bin
/install -c
13 UNITTESTS
=OscUnitTests
15 RECEIVE
=OscReceiveTest
20 LIBSONAME
= $(LIBNAME
).so
21 LIBFILENAME
= $(LIBSONAME
).1.0.2
23 #Test and example source
24 SENDSOURCES
= .
/tests
/OscSendTests.
cpp .
/osc
/OscOutboundPacketStream.
cpp .
/osc
/OscTypes.
cpp .
/ip
/posix
/NetworkingUtils.
cpp .
/ip
/posix
/UdpSocket.
cpp .
/ip
/IpEndpointName.
cpp
25 SENDOBJECTS
= $(SENDSOURCES
:.
cpp=.o
)
27 RECEIVESOURCES
= .
/tests
/OscReceiveTest.
cpp .
/osc
/OscTypes.
cpp .
/osc
/OscReceivedElements.
cpp .
/osc
/OscPrintReceivedElements.
cpp .
/ip
/posix
/NetworkingUtils.
cpp .
/ip
/posix
/UdpSocket.
cpp
28 RECEIVEOBJECTS
= $(RECEIVESOURCES
:.
cpp=.o
)
30 DUMPSOURCES
= .
/examples
/OscDump.
cpp .
/osc
/OscTypes.
cpp .
/osc
/OscReceivedElements.
cpp .
/osc
/OscPrintReceivedElements.
cpp .
/ip
/posix
/NetworkingUtils.
cpp .
/ip
/posix
/UdpSocket.
cpp
31 DUMPOBJECTS
= $(DUMPSOURCES
:.
cpp=.o
)
33 UNITTESTSOURCES
= .
/tests
/OscUnitTests.
cpp .
/osc
/OscOutboundPacketStream.
cpp .
/osc
/OscTypes.
cpp .
/osc
/OscReceivedElements.
cpp .
/osc
/OscPrintReceivedElements.
cpp
34 UNITTESTOBJECTS
= $(UNITTESTSOURCES
:.
cpp=.o
)
37 LIBSOURCES
= .
/ip
/IpEndpointName.
cpp \
38 .
/ip
/posix
/NetworkingUtils.
cpp .
/ip
/posix
/UdpSocket.
cpp\
39 .
/osc
/OscOutboundPacketStream.
cpp .
/osc
/OscPrintReceivedElements.
cpp .
/osc
/OscReceivedElements.
cpp .
/osc
/OscTypes.
cpp
40 LIBOBJECTS
= $(LIBSOURCES
:.
cpp=.o
)
42 all: unittests send receive dump
44 unittests
: $(UNITTESTOBJECTS
)
45 @if
[ ! -d bin
] ; then mkdir bin
; fi
46 $(CXX
) -o bin
/$(UNITTESTS
) $+ $(LIBS
)
48 @if
[ ! -d bin
] ; then mkdir bin
; fi
49 $(CXX
) -o bin
/$(SEND
) $+ $(LIBS
)
50 receive
: $(RECEIVEOBJECTS
)
51 @if
[ ! -d bin
] ; then mkdir bin
; fi
52 $(CXX
) -o bin
/$(RECEIVE
) $+ $(LIBS
)
54 @if
[ ! -d bin
] ; then mkdir bin
; fi
55 $(CXX
) -o bin
/$(DUMP
) $+ $(LIBS
)
58 rm -rf bin
$(UNITTESTOBJECTS
) $(SENDOBJECTS
) $(RECEIVEOBJECTS
) $(DUMPOBJECTS
) $(LIBOBJECTS
) $(LIBFILENAME
) include lib oscpack
&> /dev
/null
60 $(LIBFILENAME
): $(LIBOBJECTS
)
62 $(CXX
) -shared
-Wl
,-soname
,$(LIBSONAME
) -o
$(LIBFILENAME
) $(LIBOBJECTS
) -lc
64 @
#$(CXX) -dynamiclib -Wl,-install_name,$(LIBSONAME) -o $(LIBFILENAME) $(LIBOBJECTS) -lc
68 #Installs the library on a system global location
70 @
$(INSTALL
) -m
755 $(LIBFILENAME
) $(PREFIX
)/lib
/$(LIBFILENAME
)
71 @ln
-s
-f
$(PREFIX
)/lib
/$(LIBFILENAME
) $(PREFIX
)/lib
/$(LIBSONAME
)
72 @mkdir
-p
$(PREFIX
)/include/oscpack
/ip
$(PREFIX
)/include/oscpack
/osc
73 @
$(INSTALL
) -m
644 ip
/*.h
$(PREFIX
)/include/oscpack
/ip
74 @
$(INSTALL
) -m
644 osc
/*.h
$(PREFIX
)/include/oscpack
/osc
75 @echo
"SUCCESS! oscpack has been installed in $(PREFIX)/lib and $(PREFIX)/include/ospack/"
77 #Installs the include/lib structure locally
80 @echo
" Installing in local directory <$(INCLUDEDIR)>"
81 @echo
" > Creating symbolic link"
82 @ln
-s
$(LIBFILENAME
) $(LIBSONAME
)
83 @echo
" > Creating directories"
85 @mkdir
-p oscpack
/include/ip
86 @mkdir
-p oscpack
/include/osc
87 @echo
" > Copying files"
88 @mv
$(LIBFILENAME
) $(LIBSONAME
) oscpack
/lib
89 @cp ip
/*.h oscpack
/include/ip
90 @cp osc
/*.h oscpack
/include/osc