diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ebc6265..2d8aaaa5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -146,6 +146,5 @@ endif() add_subdirectory(common) -add_subdirectory(message) add_subdirectory(server) add_subdirectory(client) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index a7405535..7851a184 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -11,6 +11,7 @@ set(CLIENT_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} common message) set(CLIENT_INCLUDE ${CMAKE_SOURCE_DIR}/client + ${CMAKE_SOURCE_DIR}/common ${ASIO_INCLUDE_DIRS} ${POPL_INCLUDE_DIRS}) diff --git a/client/Makefile b/client/Makefile index 9143ed21..c4b42d90 100644 --- a/client/Makefile +++ b/client/Makefile @@ -34,9 +34,9 @@ endif DEBUG=-O3 -CXXFLAGS += $(ADD_CFLAGS) -std=c++0x -Wall -Wno-unused-function $(DEBUG) -DHAS_FLAC -DHAS_OGG -DASIO_STANDALONE -DVERSION=\"$(VERSION)\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -I../externals/aixlog/include -I../externals +CXXFLAGS += $(ADD_CFLAGS) -std=c++0x -Wall -Wno-unused-function $(DEBUG) -DHAS_FLAC -DHAS_OGG -DASIO_STANDALONE -DVERSION=\"$(VERSION)\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -I../externals/aixlog/include -I../externals -I../common LDFLAGS = -logg -lFLAC -OBJ = snapClient.o stream.o clientConnection.o timeProvider.o player/player.o decoder/pcmDecoder.o decoder/oggDecoder.o decoder/flacDecoder.o controller.o ../message/pcmChunk.o ../common/sampleFormat.o +OBJ = snapClient.o stream.o clientConnection.o timeProvider.o player/player.o decoder/pcmDecoder.o decoder/oggDecoder.o decoder/flacDecoder.o controller.o ../common/message/pcmChunk.o ../common/sampleFormat.o ifneq (,$(TARGET)) diff --git a/client/decoder/flacDecoder.cpp b/client/decoder/flacDecoder.cpp index df23a70c..4ca1d1ea 100644 --- a/client/decoder/flacDecoder.cpp +++ b/client/decoder/flacDecoder.cpp @@ -21,7 +21,7 @@ #include #include "flacDecoder.h" #include "common/snapException.h" -#include "common/endian.h" +#include "common/endian.hpp" #include "aixlog.hpp" diff --git a/client/decoder/oggDecoder.cpp b/client/decoder/oggDecoder.cpp index 93bca3a9..9c0542c5 100644 --- a/client/decoder/oggDecoder.cpp +++ b/client/decoder/oggDecoder.cpp @@ -22,7 +22,7 @@ #include "oggDecoder.h" #include "common/snapException.h" -#include "common/endian.h" +#include "common/endian.hpp" #include "aixlog.hpp" diff --git a/client/decoder/pcmDecoder.cpp b/client/decoder/pcmDecoder.cpp index ae8cc22f..261cae7d 100644 --- a/client/decoder/pcmDecoder.cpp +++ b/client/decoder/pcmDecoder.cpp @@ -17,7 +17,7 @@ ***/ #include "common/snapException.h" -#include "common/endian.h" +#include "common/endian.hpp" #include "aixlog.hpp" #include "pcmDecoder.h" diff --git a/client/player/player.h b/client/player/player.h index 94052930..f30aa16a 100644 --- a/client/player/player.h +++ b/client/player/player.h @@ -25,7 +25,7 @@ #include #include "stream.h" #include "pcmDevice.h" -#include "common/endian.h" +#include "common/endian.hpp" #include "aixlog.hpp" diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 6e9dc37e..0debd879 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -1 +1,2 @@ -add_library(common STATIC daemon.cpp sampleFormat.cpp) \ No newline at end of file +add_library(common STATIC daemon.cpp sampleFormat.cpp) +add_subdirectory(message) diff --git a/common/endian.h b/common/endian.hpp similarity index 100% rename from common/endian.h rename to common/endian.hpp diff --git a/message/CMakeLists.txt b/common/message/CMakeLists.txt similarity index 100% rename from message/CMakeLists.txt rename to common/message/CMakeLists.txt diff --git a/message/codecHeader.h b/common/message/codecHeader.h similarity index 100% rename from message/codecHeader.h rename to common/message/codecHeader.h diff --git a/message/hello.h b/common/message/hello.h similarity index 100% rename from message/hello.h rename to common/message/hello.h diff --git a/message/jsonMessage.h b/common/message/jsonMessage.h similarity index 100% rename from message/jsonMessage.h rename to common/message/jsonMessage.h diff --git a/message/message.h b/common/message/message.h similarity index 99% rename from message/message.h rename to common/message/message.h index 3f2db9ae..0ebe7d4e 100644 --- a/message/message.h +++ b/common/message/message.h @@ -25,7 +25,7 @@ #include #include #include -#include "common/endian.h" +#include "common/endian.hpp" #include "common/timeDefs.h" diff --git a/message/pcmChunk.cpp b/common/message/pcmChunk.cpp similarity index 100% rename from message/pcmChunk.cpp rename to common/message/pcmChunk.cpp diff --git a/message/pcmChunk.h b/common/message/pcmChunk.h similarity index 100% rename from message/pcmChunk.h rename to common/message/pcmChunk.h diff --git a/message/serverSettings.h b/common/message/serverSettings.h similarity index 100% rename from message/serverSettings.h rename to common/message/serverSettings.h diff --git a/message/streamTags.h b/common/message/streamTags.h similarity index 100% rename from message/streamTags.h rename to common/message/streamTags.h diff --git a/message/time.h b/common/message/time.h similarity index 100% rename from message/time.h rename to common/message/time.h diff --git a/message/wireChunk.h b/common/message/wireChunk.h similarity index 100% rename from message/wireChunk.h rename to common/message/wireChunk.h diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 6cea900f..a535c394 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -25,6 +25,7 @@ set(SERVER_LIBRARIES set(SERVER_INCLUDE ${CMAKE_SOURCE_DIR}/server + ${CMAKE_SOURCE_DIR}/common ${FLAC_INCLUDE_DIRS}) # Avahi diff --git a/server/Makefile b/server/Makefile index c393e778..a18a228a 100644 --- a/server/Makefile +++ b/server/Makefile @@ -34,9 +34,9 @@ endif DEBUG=-O3 -CXXFLAGS += $(ADD_CFLAGS) -std=c++0x -Wall -Wno-unused-function $(DEBUG) -DHAS_FLAC -DHAS_OGG -DHAS_VORBIS -DHAS_VORBIS_ENC -DASIO_STANDALONE -DVERSION=\"$(VERSION)\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -I../externals/aixlog/include -I../externals +CXXFLAGS += $(ADD_CFLAGS) -std=c++0x -Wall -Wno-unused-function $(DEBUG) -DHAS_FLAC -DHAS_OGG -DHAS_VORBIS -DHAS_VORBIS_ENC -DASIO_STANDALONE -DVERSION=\"$(VERSION)\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -I../externals/aixlog/include -I../externals -I../common LDFLAGS = -lvorbis -lvorbisenc -logg -lFLAC -OBJ = snapServer.o config.o controlServer.o controlSession.o jsonrp.o streamServer.o streamSession.o streamreader/streamUri.o streamreader/streamManager.o streamreader/pcmStream.o streamreader/pipeStream.o streamreader/fileStream.o streamreader/processStream.o streamreader/airplayStream.o streamreader/spotifyStream.o streamreader/watchdog.o encoder/encoderFactory.o encoder/flacEncoder.o encoder/pcmEncoder.o encoder/oggEncoder.o ../common/sampleFormat.o ../message/pcmChunk.o ../common/base64.o +OBJ = snapServer.o config.o controlServer.o controlSession.o jsonrp.o streamServer.o streamSession.o streamreader/streamUri.o streamreader/streamManager.o streamreader/pcmStream.o streamreader/pipeStream.o streamreader/fileStream.o streamreader/processStream.o streamreader/airplayStream.o streamreader/spotifyStream.o streamreader/watchdog.o encoder/encoderFactory.o encoder/flacEncoder.o encoder/pcmEncoder.o encoder/oggEncoder.o ../common/sampleFormat.o ../common/message/pcmChunk.o ../common/base64.o ifneq (,$(TARGET)) CXXFLAGS += -D$(TARGET) diff --git a/server/encoder/pcmEncoder.cpp b/server/encoder/pcmEncoder.cpp index 6f75cf7c..c8ee3b29 100644 --- a/server/encoder/pcmEncoder.cpp +++ b/server/encoder/pcmEncoder.cpp @@ -17,7 +17,7 @@ ***/ #include -#include "common/endian.h" +#include "common/endian.hpp" #include "pcmEncoder.h"