From 776597437470dc9347a3430ab05bdd9a441a2ef5 Mon Sep 17 00:00:00 2001 From: ttldtor Date: Tue, 7 Apr 2020 07:23:22 -0400 Subject: [PATCH 1/6] Simple makefile --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9110e7e3..bb0fc1d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ # / +/obj +*.o /bin /ipch /**/*.suo @@ -20,4 +22,4 @@ cmake-build-release*/** /**/*.log /**/*.*~ -/docs/dxfeed*/ \ No newline at end of file +/docs/dxfeed*/ From d619f02fd886e86c66a62e2ed86c42e51fdfb319 Mon Sep 17 00:00:00 2001 From: ttldtor Date: Tue, 7 Apr 2020 07:23:43 -0400 Subject: [PATCH 2/6] Simple makefile --- Makefile | 11 +++++++++++ src/Makefile | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 Makefile create mode 100644 src/Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..7531f64f --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +SUBDIRS = src + +.PHONY: all $(SUBDIRS) + +all: subdirs + +subdirs: $(SUBDIRS) + +$(SUBDIRS): + $(MAKE) -C $@ + diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 00000000..f6fbb04a --- /dev/null +++ b/src/Makefile @@ -0,0 +1,50 @@ +.PHONY: all clean depends + +CFLAGS+= -O2 -DUSE_PTHREADS -std=c99 -D_POSIX_C_SOURCE=200112L -fPIC -I../include +LDFLAGS+= -rt -pthread + +LIB= libDXFeed.so +SRCS= BufferedInput.c \ + BufferedIOCommon.c \ + BufferedOutput.c \ + Candle.c \ + ClientMessageProcessor.c \ + ConfigurationDeserializer.c \ + ConnectionContextData.c \ + DataStructures.c \ + Decimal.c \ + DXAddressParser.c \ + DXAlgorithms.c \ + DXErrorCodes.c \ + DXErrorHandling.c \ + DXFeed.c \ + DXMemory.c \ + DXNetwork.c \ + DXPMessageData.c \ + DXProperties.c \ + DXSockets.c \ + DXThreads.c \ + EventData.c \ + EventManager.c \ + EventSubscription.c \ + Linux.c \ + Logger.c \ + ObjectArray.c \ + PriceLevelBook.c \ + RecordBuffers.c \ + RecordFieldSetters.c \ + RecordTranscoder.c \ + RegionalBook.c \ + ServerMessageProcessor.c \ + Snapshot.c \ + SymbolCodec.c \ + TaskQueue.c \ + TestParser.c \ + Version.c +OBJS= $(SRCS:.c=.o) + +all: $(LIB) + +$(LIB): $(OBJS) + $(CC) $(LDFLAGS) -shared -Wl,-soname,$(LIB) -o $(LIB) $(OBJS) + From 45d0c7e03227a39cfe4b6e753bf8dd3a8e000981 Mon Sep 17 00:00:00 2001 From: ttldtor Date: Wed, 8 Apr 2020 11:18:07 -0400 Subject: [PATCH 3/6] Add the ability to run Makefile from folder --- .gitignore | 2 + Makefile | 191 +++++++++++++++++++++++++++++++++++++++++++++++++-- src/Logger.c | 12 +++- src/Makefile | 50 -------------- 4 files changed, 197 insertions(+), 58 deletions(-) delete mode 100644 src/Makefile diff --git a/.gitignore b/.gitignore index bb0fc1d3..9a7dea1c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,14 @@ # / /obj *.o +*.swp /bin /ipch /**/*.suo /**/*.user /**/*.aps /**/build +/**/build* /*.ncb /*.sdf /*.opensdf diff --git a/Makefile b/Makefile index 7531f64f..cacd8641 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,190 @@ -SUBDIRS = src +.POSIX: +.SUFFIXES: +.PHONY: all clean depends -.PHONY: all $(SUBDIRS) +OBJ = obj +BIN = bin +COMMON_CFLAGS = -O2 -DUSE_PTHREADS -std=c99 -D_POSIX_SOURCE \ + -D_POSIX_C_SOURCE=200809L -fPIC -I../include +COMMON_LDFLAGS = -lrt -pthread +LIB = libDXFeed.so +LIB_TARGET = $(BIN)/$(LIB) -all: subdirs +all: $(LIB_TARGET) -subdirs: $(SUBDIRS) +clean: + rm -f $(BIN)/*.so + rm -f $(OBJ)/*.o -$(SUBDIRS): - $(MAKE) -C $@ +# Common + +Prepare: + mkdir -p obj + mkdir -p bin + +# DXFeed library + +CFLAGS += $(COMMON_CFLAGS) -I../src +LDFLAGS += $(COMMON_LDFLAGS) + +OBJS = \ + $(OBJ)/BufferedInput.c.o \ + $(OBJ)/BufferedIOCommon.c.o \ + $(OBJ)/BufferedOutput.c.o \ + $(OBJ)/Candle.c.o \ + $(OBJ)/ClientMessageProcessor.c.o \ + $(OBJ)/ConfigurationDeserializer.c.o \ + $(OBJ)/ConnectionContextData.c.o \ + $(OBJ)/DataStructures.c.o \ + $(OBJ)/Decimal.c.o \ + $(OBJ)/DXAddressParser.c.o \ + $(OBJ)/DXAlgorithms.c.o \ + $(OBJ)/DXErrorCodes.c.o \ + $(OBJ)/DXErrorHandling.c.o \ + $(OBJ)/DXFeed.c.o \ + $(OBJ)/DXMemory.c.o \ + $(OBJ)/DXNetwork.c.o \ + $(OBJ)/DXPMessageData.c.o \ + $(OBJ)/DXProperties.c.o \ + $(OBJ)/DXSockets.c.o \ + $(OBJ)/DXThreads.c.o \ + $(OBJ)/EventData.c.o \ + $(OBJ)/EventManager.c.o \ + $(OBJ)/EventSubscription.c.o \ + $(OBJ)/Linux.c.o \ + $(OBJ)/Logger.c.o \ + $(OBJ)/ObjectArray.c.o \ + $(OBJ)/PriceLevelBook.c.o \ + $(OBJ)/RecordBuffers.c.o \ + $(OBJ)/RecordFieldSetters.c.o \ + $(OBJ)/RecordTranscoder.c.o \ + $(OBJ)/RegionalBook.c.o \ + $(OBJ)/ServerMessageProcessor.c.o \ + $(OBJ)/Snapshot.c.o \ + $(OBJ)/SymbolCodec.c.o \ + $(OBJ)/TaskQueue.c.o \ + $(OBJ)/TestParser.c.o \ + $(OBJ)/Version.c.o + +$(LIB_TARGET): Prepare $(OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(LIB) -o $(LIB_TARGET) $(OBJS) + +clean-$(LIB): + rm -f $(LIB_TARGET) $(OBJS) + +$(OBJ)/BufferedInput.c.o: ../src/BufferedInput.c ../include/DXFeed.h \ + ../src/BufferedInput.h ../src/DXErrorHandling.h ../src/DXMemory.h \ + ../src/DXAlgorithms.h ../src/ConnectionContextData.h + $(CC) $(CFLAGS) ../src/BufferedInput.c -c -o ./$@ + +$(OBJ)/BufferedIOCommon.c.o: ../src/BufferedIOCommon.c ../src/BufferedIOCommon.h \ + ../src/DXErrorHandling.h ../src/DXMemory.h + $(CC) $(CFLAGS) ../src/BufferedIOCommon.c -c -o ./$@ + +$(OBJ)/BufferedOutput.c.o: ../src/BufferedOutput.c ../include/DXFeed.h \ + ../src/BufferedOutput.h ../src/DXErrorHandling.h ../src/DXMemory.h \ + ../src/DXAlgorithms.h ../src/DXThreads.h ../src/ConnectionContextData.h + $(CC) $(CFLAGS) ../src/BufferedOutput.c -c -o $@ + +$(OBJ)/Candle.c.o: + $(CC) $(CFLAGS) ../src/Candle.c -c -o $@ + +$(OBJ)/ClientMessageProcessor.c.o: + $(CC) $(CFLAGS) ../src/ClientMessageProcessor.c -c -o $@ + +$(OBJ)/ConfigurationDeserializer.c.o: + $(CC) $(CFLAGS) ../src/ConfigurationDeserializer.c -c -o $@ + +$(OBJ)/ConnectionContextData.c.o: + $(CC) $(CFLAGS) ../src/ConnectionContextData.c -c -o $@ + +$(OBJ)/DataStructures.c.o: + $(CC) $(CFLAGS) ../src/DataStructures.c -c -o $@ + +$(OBJ)/Decimal.c.o: + $(CC) $(CFLAGS) ../src/Decimal.c -c -o $@ + +$(OBJ)/DXAddressParser.c.o: + $(CC) $(CFLAGS) ../src/DXAddressParser.c -c -o $@ + +$(OBJ)/DXAlgorithms.c.o: + $(CC) $(CFLAGS) ../src/DXAlgorithms.c -c -o $@ + +$(OBJ)/DXErrorCodes.c.o: + $(CC) $(CFLAGS) ../src/DXErrorCodes.c -c -o $@ + +$(OBJ)/DXErrorHandling.c.o: + $(CC) $(CFLAGS) ../src/DXErrorHandling.c -c -o $@ + +$(OBJ)/DXFeed.c.o: + $(CC) $(CFLAGS) ../src/DXFeed.c -c -o $@ + +$(OBJ)/DXMemory.c.o: + $(CC) $(CFLAGS) ../src/DXMemory.c -c -o $@ + +$(OBJ)/DXNetwork.c.o: + $(CC) $(CFLAGS) ../src/DXNetwork.c -c -o $@ + +$(OBJ)/DXPMessageData.c.o: + $(CC) $(CFLAGS) ../src/DXPMessageData.c -c -o $@ + +$(OBJ)/DXProperties.c.o: + $(CC) $(CFLAGS) ../src/DXProperties.c -c -o $@ + +$(OBJ)/DXSockets.c.o: + $(CC) $(CFLAGS) ../src/DXSockets.c -c -o $@ + +$(OBJ)/DXThreads.c.o: + $(CC) $(CFLAGS) ../src/DXThreads.c -c -o $@ + +$(OBJ)/EventData.c.o: + $(CC) $(CFLAGS) ../src/EventData.c -c -o $@ + +$(OBJ)/EventManager.c.o: + $(CC) $(CFLAGS) ../src/EventManager.c -c -o $@ + +$(OBJ)/EventSubscription.c.o: + $(CC) $(CFLAGS) ../src/EventSubscription.c -c -o $@ + +$(OBJ)/Linux.c.o: + $(CC) $(CFLAGS) ../src/Linux.c -c -o $@ + +$(OBJ)/Logger.c.o: + $(CC) $(CFLAGS) ../src/Logger.c -c -o $@ + +$(OBJ)/ObjectArray.c.o: + $(CC) $(CFLAGS) ../src/ObjectArray.c -c -o $@ + +$(OBJ)/PriceLevelBook.c.o: + $(CC) $(CFLAGS) ../src/PriceLevelBook.c -c -o $@ + +$(OBJ)/RecordBuffers.c.o: + $(CC) $(CFLAGS) ../src/RecordBuffers.c -c -o $@ + +$(OBJ)/RecordFieldSetters.c.o: + $(CC) $(CFLAGS) ../src/RecordFieldSetters.c -c -o $@ + +$(OBJ)/RecordTranscoder.c.o: + $(CC) $(CFLAGS) ../src/RecordTranscoder.c -c -o $@ + +$(OBJ)/RegionalBook.c.o: + $(CC) $(CFLAGS) ../src/RegionalBook.c -c -o $@ + +$(OBJ)/ServerMessageProcessor.c.o: + $(CC) $(CFLAGS) ../src/ServerMessageProcessor.c -c -o $@ + +$(OBJ)/Snapshot.c.o: + $(CC) $(CFLAGS) ../src/Snapshot.c -c -o $@ + +$(OBJ)/SymbolCodec.c.o: + $(CC) $(CFLAGS) ../src/SymbolCodec.c -c -o $@ + +$(OBJ)/TaskQueue.c.o: + $(CC) $(CFLAGS) ../src/TaskQueue.c -c -o $@ + +$(OBJ)/TestParser.c.o:: + $(CC) $(CFLAGS) ../src/TestParser.c -c -o $@ + +$(OBJ)/Version.c.o: + $(CC) $(CFLAGS) ../src/Version.c -c -o $@ diff --git a/src/Logger.c b/src/Logger.c index 5f6ac559..1e721586 100644 --- a/src/Logger.c +++ b/src/Logger.c @@ -121,6 +121,14 @@ const dxf_char_t* dx_get_current_time (void) { } #else // _WIN32 +int local_utc_offset_seconds() { + time_t raw_time = time(NULL); + struct tm *gmt_tm = gmtime(&raw_time); + gmt_tm->tm_isdst = -1; + time_t gmt = mktime(gmt_tm); + + return (int)(difftime(raw_time, gmt)); +} dxf_const_string_t dx_get_current_time () { dxf_char_t* time_buffer = dx_get_current_time_buffer(); @@ -138,7 +146,7 @@ dxf_const_string_t dx_get_current_time () { ltm.tm_hour, ltm.tm_min, ltm.tm_sec, 0); if (g_show_timezone) { - swprintf(time_buffer + CURRENT_TIME_STR_TIME_OFFSET, 7, L" GMT%+.2d", ltm.tm_gmtoff / 3600); + swprintf(time_buffer + CURRENT_TIME_STR_TIME_OFFSET, 7, L" GMT%+.2d", local_utc_offset_seconds() / 3600); } return time_buffer; @@ -511,4 +519,4 @@ void dx_logging_verbose_gap (void) { } fwprintf(g_log_file, L"\n"); dx_flush_log(); -} \ No newline at end of file +} diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index f6fbb04a..00000000 --- a/src/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -.PHONY: all clean depends - -CFLAGS+= -O2 -DUSE_PTHREADS -std=c99 -D_POSIX_C_SOURCE=200112L -fPIC -I../include -LDFLAGS+= -rt -pthread - -LIB= libDXFeed.so -SRCS= BufferedInput.c \ - BufferedIOCommon.c \ - BufferedOutput.c \ - Candle.c \ - ClientMessageProcessor.c \ - ConfigurationDeserializer.c \ - ConnectionContextData.c \ - DataStructures.c \ - Decimal.c \ - DXAddressParser.c \ - DXAlgorithms.c \ - DXErrorCodes.c \ - DXErrorHandling.c \ - DXFeed.c \ - DXMemory.c \ - DXNetwork.c \ - DXPMessageData.c \ - DXProperties.c \ - DXSockets.c \ - DXThreads.c \ - EventData.c \ - EventManager.c \ - EventSubscription.c \ - Linux.c \ - Logger.c \ - ObjectArray.c \ - PriceLevelBook.c \ - RecordBuffers.c \ - RecordFieldSetters.c \ - RecordTranscoder.c \ - RegionalBook.c \ - ServerMessageProcessor.c \ - Snapshot.c \ - SymbolCodec.c \ - TaskQueue.c \ - TestParser.c \ - Version.c -OBJS= $(SRCS:.c=.o) - -all: $(LIB) - -$(LIB): $(OBJS) - $(CC) $(LDFLAGS) -shared -Wl,-soname,$(LIB) -o $(LIB) $(OBJS) - From abfae08acc31b76c4570c6f10690a5b4185d168c Mon Sep 17 00:00:00 2001 From: ttldtor Date: Wed, 8 Apr 2020 13:10:00 -0400 Subject: [PATCH 4/6] Renaming + --- Makefile | 190 --------------------------------------- Makefile.aix | 245 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 245 insertions(+), 190 deletions(-) delete mode 100644 Makefile create mode 100644 Makefile.aix diff --git a/Makefile b/Makefile deleted file mode 100644 index cacd8641..00000000 --- a/Makefile +++ /dev/null @@ -1,190 +0,0 @@ -.POSIX: -.SUFFIXES: -.PHONY: all clean depends - -OBJ = obj -BIN = bin -COMMON_CFLAGS = -O2 -DUSE_PTHREADS -std=c99 -D_POSIX_SOURCE \ - -D_POSIX_C_SOURCE=200809L -fPIC -I../include -COMMON_LDFLAGS = -lrt -pthread -LIB = libDXFeed.so -LIB_TARGET = $(BIN)/$(LIB) - -all: $(LIB_TARGET) - -clean: - rm -f $(BIN)/*.so - rm -f $(OBJ)/*.o - -# Common - -Prepare: - mkdir -p obj - mkdir -p bin - -# DXFeed library - -CFLAGS += $(COMMON_CFLAGS) -I../src -LDFLAGS += $(COMMON_LDFLAGS) - -OBJS = \ - $(OBJ)/BufferedInput.c.o \ - $(OBJ)/BufferedIOCommon.c.o \ - $(OBJ)/BufferedOutput.c.o \ - $(OBJ)/Candle.c.o \ - $(OBJ)/ClientMessageProcessor.c.o \ - $(OBJ)/ConfigurationDeserializer.c.o \ - $(OBJ)/ConnectionContextData.c.o \ - $(OBJ)/DataStructures.c.o \ - $(OBJ)/Decimal.c.o \ - $(OBJ)/DXAddressParser.c.o \ - $(OBJ)/DXAlgorithms.c.o \ - $(OBJ)/DXErrorCodes.c.o \ - $(OBJ)/DXErrorHandling.c.o \ - $(OBJ)/DXFeed.c.o \ - $(OBJ)/DXMemory.c.o \ - $(OBJ)/DXNetwork.c.o \ - $(OBJ)/DXPMessageData.c.o \ - $(OBJ)/DXProperties.c.o \ - $(OBJ)/DXSockets.c.o \ - $(OBJ)/DXThreads.c.o \ - $(OBJ)/EventData.c.o \ - $(OBJ)/EventManager.c.o \ - $(OBJ)/EventSubscription.c.o \ - $(OBJ)/Linux.c.o \ - $(OBJ)/Logger.c.o \ - $(OBJ)/ObjectArray.c.o \ - $(OBJ)/PriceLevelBook.c.o \ - $(OBJ)/RecordBuffers.c.o \ - $(OBJ)/RecordFieldSetters.c.o \ - $(OBJ)/RecordTranscoder.c.o \ - $(OBJ)/RegionalBook.c.o \ - $(OBJ)/ServerMessageProcessor.c.o \ - $(OBJ)/Snapshot.c.o \ - $(OBJ)/SymbolCodec.c.o \ - $(OBJ)/TaskQueue.c.o \ - $(OBJ)/TestParser.c.o \ - $(OBJ)/Version.c.o - -$(LIB_TARGET): Prepare $(OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(LIB) -o $(LIB_TARGET) $(OBJS) - -clean-$(LIB): - rm -f $(LIB_TARGET) $(OBJS) - -$(OBJ)/BufferedInput.c.o: ../src/BufferedInput.c ../include/DXFeed.h \ - ../src/BufferedInput.h ../src/DXErrorHandling.h ../src/DXMemory.h \ - ../src/DXAlgorithms.h ../src/ConnectionContextData.h - $(CC) $(CFLAGS) ../src/BufferedInput.c -c -o ./$@ - -$(OBJ)/BufferedIOCommon.c.o: ../src/BufferedIOCommon.c ../src/BufferedIOCommon.h \ - ../src/DXErrorHandling.h ../src/DXMemory.h - $(CC) $(CFLAGS) ../src/BufferedIOCommon.c -c -o ./$@ - -$(OBJ)/BufferedOutput.c.o: ../src/BufferedOutput.c ../include/DXFeed.h \ - ../src/BufferedOutput.h ../src/DXErrorHandling.h ../src/DXMemory.h \ - ../src/DXAlgorithms.h ../src/DXThreads.h ../src/ConnectionContextData.h - $(CC) $(CFLAGS) ../src/BufferedOutput.c -c -o $@ - -$(OBJ)/Candle.c.o: - $(CC) $(CFLAGS) ../src/Candle.c -c -o $@ - -$(OBJ)/ClientMessageProcessor.c.o: - $(CC) $(CFLAGS) ../src/ClientMessageProcessor.c -c -o $@ - -$(OBJ)/ConfigurationDeserializer.c.o: - $(CC) $(CFLAGS) ../src/ConfigurationDeserializer.c -c -o $@ - -$(OBJ)/ConnectionContextData.c.o: - $(CC) $(CFLAGS) ../src/ConnectionContextData.c -c -o $@ - -$(OBJ)/DataStructures.c.o: - $(CC) $(CFLAGS) ../src/DataStructures.c -c -o $@ - -$(OBJ)/Decimal.c.o: - $(CC) $(CFLAGS) ../src/Decimal.c -c -o $@ - -$(OBJ)/DXAddressParser.c.o: - $(CC) $(CFLAGS) ../src/DXAddressParser.c -c -o $@ - -$(OBJ)/DXAlgorithms.c.o: - $(CC) $(CFLAGS) ../src/DXAlgorithms.c -c -o $@ - -$(OBJ)/DXErrorCodes.c.o: - $(CC) $(CFLAGS) ../src/DXErrorCodes.c -c -o $@ - -$(OBJ)/DXErrorHandling.c.o: - $(CC) $(CFLAGS) ../src/DXErrorHandling.c -c -o $@ - -$(OBJ)/DXFeed.c.o: - $(CC) $(CFLAGS) ../src/DXFeed.c -c -o $@ - -$(OBJ)/DXMemory.c.o: - $(CC) $(CFLAGS) ../src/DXMemory.c -c -o $@ - -$(OBJ)/DXNetwork.c.o: - $(CC) $(CFLAGS) ../src/DXNetwork.c -c -o $@ - -$(OBJ)/DXPMessageData.c.o: - $(CC) $(CFLAGS) ../src/DXPMessageData.c -c -o $@ - -$(OBJ)/DXProperties.c.o: - $(CC) $(CFLAGS) ../src/DXProperties.c -c -o $@ - -$(OBJ)/DXSockets.c.o: - $(CC) $(CFLAGS) ../src/DXSockets.c -c -o $@ - -$(OBJ)/DXThreads.c.o: - $(CC) $(CFLAGS) ../src/DXThreads.c -c -o $@ - -$(OBJ)/EventData.c.o: - $(CC) $(CFLAGS) ../src/EventData.c -c -o $@ - -$(OBJ)/EventManager.c.o: - $(CC) $(CFLAGS) ../src/EventManager.c -c -o $@ - -$(OBJ)/EventSubscription.c.o: - $(CC) $(CFLAGS) ../src/EventSubscription.c -c -o $@ - -$(OBJ)/Linux.c.o: - $(CC) $(CFLAGS) ../src/Linux.c -c -o $@ - -$(OBJ)/Logger.c.o: - $(CC) $(CFLAGS) ../src/Logger.c -c -o $@ - -$(OBJ)/ObjectArray.c.o: - $(CC) $(CFLAGS) ../src/ObjectArray.c -c -o $@ - -$(OBJ)/PriceLevelBook.c.o: - $(CC) $(CFLAGS) ../src/PriceLevelBook.c -c -o $@ - -$(OBJ)/RecordBuffers.c.o: - $(CC) $(CFLAGS) ../src/RecordBuffers.c -c -o $@ - -$(OBJ)/RecordFieldSetters.c.o: - $(CC) $(CFLAGS) ../src/RecordFieldSetters.c -c -o $@ - -$(OBJ)/RecordTranscoder.c.o: - $(CC) $(CFLAGS) ../src/RecordTranscoder.c -c -o $@ - -$(OBJ)/RegionalBook.c.o: - $(CC) $(CFLAGS) ../src/RegionalBook.c -c -o $@ - -$(OBJ)/ServerMessageProcessor.c.o: - $(CC) $(CFLAGS) ../src/ServerMessageProcessor.c -c -o $@ - -$(OBJ)/Snapshot.c.o: - $(CC) $(CFLAGS) ../src/Snapshot.c -c -o $@ - -$(OBJ)/SymbolCodec.c.o: - $(CC) $(CFLAGS) ../src/SymbolCodec.c -c -o $@ - -$(OBJ)/TaskQueue.c.o: - $(CC) $(CFLAGS) ../src/TaskQueue.c -c -o $@ - -$(OBJ)/TestParser.c.o:: - $(CC) $(CFLAGS) ../src/TestParser.c -c -o $@ - -$(OBJ)/Version.c.o: - $(CC) $(CFLAGS) ../src/Version.c -c -o $@ - diff --git a/Makefile.aix b/Makefile.aix new file mode 100644 index 00000000..441d4504 --- /dev/null +++ b/Makefile.aix @@ -0,0 +1,245 @@ +.POSIX: +.SUFFIXES: +.PHONY: all clean + +OBJ = obj +BIN = bin +COMMON_CFLAGS = -O2 -DUSE_PTHREADS -std=c99 -D_POSIX_SOURCE \ + -D_POSIX_C_SOURCE=200809L -fPIC -I../include +COMMON_LDFLAGS = -pthread +LIB_NAME = DXFeed +LIB = lib$(LIB_NAME).so +LIB_TARGET = $(BIN)/$(LIB) +COMMAND_LINE_SAMPLE = CommandLineSample +COMMAND_LINE_SAMPLE_TARGET = $(BIN)/$(COMMAND_LINE_SAMPLE) +CANDLE_SAMPLE = CandleSample +CANDLE_SAMPLE_TARGET = $(BIN)/$(CANDLE_SAMPLE) +SNAPSHOT_CONSOLE_SAMPLE = SnapshotConsoleSample +SNAPSHOT_CONSOLE_SAMPLE_TARGET = $(BIN)/$(SNAPSHOT_CONSOLE_SAMPLE) +INC_SNAPSHOT_CONSOLE_SAMPLE = IncSnapshotConsoleSample +INC_SNAPSHOT_CONSOLE_SAMPLE_TARGET = $(BIN)/$(INC_SNAPSHOT_CONSOLE_SAMPLE) +PRICE_LEVEL_BOOK_SAMPLE = PriceLevelBookSample +PRICE_LEVEL_BOOK_SAMPLE_TARGET = $(BIN)/$(PRICE_LEVEL_BOOK_SAMPLE) +REGIONAL_BOOK_SAMPLE = RegionalBookSample +REGIONAL_BOOK_SAMPLE_TARGET = $(BIN)/$(REGIONAL_BOOK_SAMPLE) + +all: $(LIB_TARGET) $(COMMAND_LINE_SAMPLE_TARGET) $(CANDLE_SAMPLE_TARGET) \ + $(SNAPSHOT_CONSOLE_SAMPLE_TARGET) \ + $(INC_SNAPSHOT_CONSOLE_SAMPLE_TARGET) \ + $(PRICE_LEVEL_BOOK_SAMPLE_TARGET) $(REGIONAL_BOOK_SAMPLE_TARGET) + +lib: $(LIB_TARGET) + +clean: + rm -f $(BIN)/*.so && rm -f $(OBJ)/*.o + +# Common + +Prepare: + mkdir -p obj && mkdir -p bin + +# DXFeed library + +LIB_CFLAGS = $(CFLAGS) $(COMMON_CFLAGS) -I../src +LIB_LDFLAGS = $(LD_FLAGS) $(COMMON_LDFLAGS) -lrt + +OBJS = \ + $(OBJ)/BufferedInput.c.o \ + $(OBJ)/BufferedIOCommon.c.o \ + $(OBJ)/BufferedOutput.c.o \ + $(OBJ)/Candle.c.o \ + $(OBJ)/ClientMessageProcessor.c.o \ + $(OBJ)/ConfigurationDeserializer.c.o \ + $(OBJ)/ConnectionContextData.c.o \ + $(OBJ)/DataStructures.c.o \ + $(OBJ)/Decimal.c.o \ + $(OBJ)/DXAddressParser.c.o \ + $(OBJ)/DXAlgorithms.c.o \ + $(OBJ)/DXErrorCodes.c.o \ + $(OBJ)/DXErrorHandling.c.o \ + $(OBJ)/DXFeed.c.o \ + $(OBJ)/DXMemory.c.o \ + $(OBJ)/DXNetwork.c.o \ + $(OBJ)/DXPMessageData.c.o \ + $(OBJ)/DXProperties.c.o \ + $(OBJ)/DXSockets.c.o \ + $(OBJ)/DXThreads.c.o \ + $(OBJ)/EventData.c.o \ + $(OBJ)/EventManager.c.o \ + $(OBJ)/EventSubscription.c.o \ + $(OBJ)/Linux.c.o \ + $(OBJ)/Logger.c.o \ + $(OBJ)/ObjectArray.c.o \ + $(OBJ)/PriceLevelBook.c.o \ + $(OBJ)/RecordBuffers.c.o \ + $(OBJ)/RecordFieldSetters.c.o \ + $(OBJ)/RecordTranscoder.c.o \ + $(OBJ)/RegionalBook.c.o \ + $(OBJ)/ServerMessageProcessor.c.o \ + $(OBJ)/Snapshot.c.o \ + $(OBJ)/SymbolCodec.c.o \ + $(OBJ)/TaskQueue.c.o \ + $(OBJ)/TestParser.c.o \ + $(OBJ)/Version.c.o + +$(LIB_TARGET): Prepare $(OBJS) + $(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -Wl,-soname,$(LIB) \ + -o $(LIB_TARGET) $(OBJS) + +$(OBJ)/BufferedInput.c.o: ../src/BufferedInput.c ../include/DXFeed.h \ + ../src/BufferedInput.h ../src/DXErrorHandling.h ../src/DXMemory.h \ + ../src/DXAlgorithms.h ../src/ConnectionContextData.h + $(CC) $(LIB_CFLAGS) ../src/BufferedInput.c -c -o ./$@ + +$(OBJ)/BufferedIOCommon.c.o: ../src/BufferedIOCommon.c \ + ../src/BufferedIOCommon.h ../src/DXErrorHandling.h ../src/DXMemory.h + $(CC) $(LIB_CFLAGS) ../src/BufferedIOCommon.c -c -o ./$@ + +$(OBJ)/BufferedOutput.c.o: ../src/BufferedOutput.c ../include/DXFeed.h \ + ../src/BufferedOutput.h ../src/DXErrorHandling.h ../src/DXMemory.h \ + ../src/DXAlgorithms.h ../src/DXThreads.h ../src/ConnectionContextData.h + $(CC) $(LIB_CFLAGS) ../src/BufferedOutput.c -c -o $@ + +$(OBJ)/Candle.c.o: + $(CC) $(LIB_CFLAGS) ../src/Candle.c -c -o $@ + +$(OBJ)/ClientMessageProcessor.c.o: + $(CC) $(LIB_CFLAGS) ../src/ClientMessageProcessor.c -c -o $@ + +$(OBJ)/ConfigurationDeserializer.c.o: + $(CC) $(LIB_CFLAGS) ../src/ConfigurationDeserializer.c -c -o $@ + +$(OBJ)/ConnectionContextData.c.o: + $(CC) $(LIB_CFLAGS) ../src/ConnectionContextData.c -c -o $@ + +$(OBJ)/DataStructures.c.o: + $(CC) $(LIB_CFLAGS) ../src/DataStructures.c -c -o $@ + +$(OBJ)/Decimal.c.o: + $(CC) $(LIB_CFLAGS) ../src/Decimal.c -c -o $@ + +$(OBJ)/DXAddressParser.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXAddressParser.c -c -o $@ + +$(OBJ)/DXAlgorithms.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXAlgorithms.c -c -o $@ + +$(OBJ)/DXErrorCodes.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXErrorCodes.c -c -o $@ + +$(OBJ)/DXErrorHandling.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXErrorHandling.c -c -o $@ + +$(OBJ)/DXFeed.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXFeed.c -c -o $@ + +$(OBJ)/DXMemory.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXMemory.c -c -o $@ + +$(OBJ)/DXNetwork.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXNetwork.c -c -o $@ + +$(OBJ)/DXPMessageData.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXPMessageData.c -c -o $@ + +$(OBJ)/DXProperties.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXProperties.c -c -o $@ + +$(OBJ)/DXSockets.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXSockets.c -c -o $@ + +$(OBJ)/DXThreads.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXThreads.c -c -o $@ + +$(OBJ)/EventData.c.o: + $(CC) $(LIB_CFLAGS) ../src/EventData.c -c -o $@ + +$(OBJ)/EventManager.c.o: + $(CC) $(LIB_CFLAGS) ../src/EventManager.c -c -o $@ + +$(OBJ)/EventSubscription.c.o: + $(CC) $(LIB_CFLAGS) ../src/EventSubscription.c -c -o $@ + +$(OBJ)/Linux.c.o: + $(CC) $(LIB_CFLAGS) ../src/Linux.c -c -o $@ + +$(OBJ)/Logger.c.o: + $(CC) $(LIB_CFLAGS) ../src/Logger.c -c -o $@ + +$(OBJ)/ObjectArray.c.o: + $(CC) $(LIB_CFLAGS) ../src/ObjectArray.c -c -o $@ + +$(OBJ)/PriceLevelBook.c.o: + $(CC) $(LIB_CFLAGS) ../src/PriceLevelBook.c -c -o $@ + +$(OBJ)/RecordBuffers.c.o: + $(CC) $(LIB_CFLAGS) ../src/RecordBuffers.c -c -o $@ + +$(OBJ)/RecordFieldSetters.c.o: + $(CC) $(LIB_CFLAGS) ../src/RecordFieldSetters.c -c -o $@ + +$(OBJ)/RecordTranscoder.c.o: + $(CC) $(LIB_CFLAGS) ../src/RecordTranscoder.c -c -o $@ + +$(OBJ)/RegionalBook.c.o: + $(CC) $(LIB_CFLAGS) ../src/RegionalBook.c -c -o $@ + +$(OBJ)/ServerMessageProcessor.c.o: + $(CC) $(LIB_CFLAGS) ../src/ServerMessageProcessor.c -c -o $@ + +$(OBJ)/Snapshot.c.o: + $(CC) $(LIB_CFLAGS) ../src/Snapshot.c -c -o $@ + +$(OBJ)/SymbolCodec.c.o: + $(CC) $(LIB_CFLAGS) ../src/SymbolCodec.c -c -o $@ + +$(OBJ)/TaskQueue.c.o: + $(CC) $(LIB_CFLAGS) ../src/TaskQueue.c -c -o $@ + +$(OBJ)/TestParser.c.o: + $(CC) $(LIB_CFLAGS) ../src/TestParser.c -c -o $@ + +$(OBJ)/Version.c.o: + $(CC) $(LIB_CFLAGS) ../src/Version.c -c -o $@ + +# Samples + +SAMPLES_CFLAGS = $(CFLAGS) $(COMMON_CFLAGS) -I../src +SAMPLES_LDFLAGS = $(LDFLAGS) $(COMMON_LDFLAGS) -L$(BIN) -l$(LIB_NAME) + +$(CANDLE_SAMPLE_TARGET): $(OBJ)/CandleSample.c.o + $(CC) $(SAMPLES_CFLAGS) $(SAMPLES_LDFLAGS) -o $@ $(OBJ)/CandleSample.c.o + +$(OBJ)/CandleSample.c.o: ../tests/CandleSample/CandleSample.c ../include/DXFeed.h ../include/DXErrorCodes.h + $(CC) $(SAMPLES_CFLAGS) ../tests/CandleSample/CandleSample.c -c -o $@ + +$(COMMAND_LINE_SAMPLE_TARGET): $(OBJ)/CommandLineSample.c.o + $(CC) $(SAMPLES_CFLAGS) $(SAMPLES_LDFLAGS) -o $@ $(OBJ)/CommandLineSample.c.o + +$(OBJ)/CommandLineSample.c.o: ../tests/CommandLineSample/CommandLineSample.c ../include/DXFeed.h ../include/DXErrorCodes.h + $(CC) $(SAMPLES_CFLAGS) ../tests/CommandLineSample/CommandLineSample.c -c -o $@ + +$(SNAPSHOT_CONSOLE_SAMPLE_TARGET): $(OBJ)/SnapshotConsoleSample.c.o + $(CC) $(SAMPLES_CFLAGS) $(SAMPLES_LDFLAGS) -o $@ $(OBJ)/SnapshotConsoleSample.c.o + +$(OBJ)/SnapshotConsoleSample.c.o: ../tests/SnapshotConsoleSample/SnapshotConsoleSample.c ../include/DXFeed.h ../include/DXErrorCodes.h + $(CC) $(SAMPLES_CFLAGS) ../tests/SnapshotConsoleSample/SnapshotConsoleSample.c -c -o $@ + +$(INC_SNAPSHOT_CONSOLE_SAMPLE_TARGET): $(OBJ)/IncSnapshotConsoleSample.c.o + $(CC) $(SAMPLES_CFLAGS) $(SAMPLES_LDFLAGS) -o $@ $(OBJ)/IncSnapshotConsoleSample.c.o + +$(OBJ)/IncSnapshotConsoleSample.c.o: ../tests/IncSnapshotConsoleSample/IncSnapshotConsoleSample.c ../include/DXFeed.h ../include/DXErrorCodes.h + $(CC) $(SAMPLES_CFLAGS) ../tests/IncSnapshotConsoleSample/IncSnapshotConsoleSample.c -c -o $@ + +$(PRICE_LEVEL_BOOK_SAMPLE_TARGET): $(OBJ)/PriceLevelBookSample.c.o + $(CC) $(SAMPLES_CFLAGS) $(SAMPLES_LDFLAGS) -o $@ $(OBJ)/PriceLevelBookSample.c.o + +$(OBJ)/PriceLevelBookSample.c.o: ../tests/PriceLevelBookSample/PriceLevelBookSample.c ../include/DXFeed.h ../include/DXErrorCodes.h + $(CC) $(SAMPLES_CFLAGS) ../tests/PriceLevelBookSample/PriceLevelBookSample.c -c -o $@ + +$(REGIONAL_BOOK_SAMPLE_TARGET): $(OBJ)/RegionalBookSample.c.o + $(CC) $(SAMPLES_CFLAGS) $(SAMPLES_LDFLAGS) -o $@ $(OBJ)/RegionalBookSample.c.o + +$(OBJ)/RegionalBookSample.c.o: ../tests/RegionalBookSample/RegionalBookSample.c ../include/DXFeed.h ../include/DXErrorCodes.h + $(CC) $(SAMPLES_CFLAGS) ../tests/RegionalBookSample/RegionalBookSample.c -c -o $@ + From fba5b0c16779eb501a46e035c57bb15ec02af8e4 Mon Sep 17 00:00:00 2001 From: ttldtor Date: Wed, 8 Apr 2020 13:26:15 -0400 Subject: [PATCH 5/6] Simplify the shared library creation --- Makefile.aix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile.aix b/Makefile.aix index 441d4504..975ce07f 100644 --- a/Makefile.aix +++ b/Makefile.aix @@ -83,8 +83,7 @@ OBJS = \ $(OBJ)/Version.c.o $(LIB_TARGET): Prepare $(OBJS) - $(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -Wl,-soname,$(LIB) \ - -o $(LIB_TARGET) $(OBJS) + $(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared -o $(LIB_TARGET) $(OBJS) $(OBJ)/BufferedInput.c.o: ../src/BufferedInput.c ../include/DXFeed.h \ ../src/BufferedInput.h ../src/DXErrorHandling.h ../src/DXMemory.h \ From 93a80c2b69362deb80f8be53ea6f4755bce217f9 Mon Sep 17 00:00:00 2001 From: ttldtor Date: Wed, 8 Apr 2020 13:34:51 -0400 Subject: [PATCH 6/6] xlc --- Makefile.aix.xlc | 244 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 244 insertions(+) create mode 100644 Makefile.aix.xlc diff --git a/Makefile.aix.xlc b/Makefile.aix.xlc new file mode 100644 index 00000000..2ac6cd2b --- /dev/null +++ b/Makefile.aix.xlc @@ -0,0 +1,244 @@ +.POSIX: +.SUFFIXES: +.PHONY: all clean + +OBJ = obj +BIN = bin +COMMON_CFLAGS = -O2 -DUSE_PTHREADS -std=c99 -D_POSIX_SOURCE \ + -D_POSIX_C_SOURCE=200809L -fPIC -I../include +COMMON_LDFLAGS = -pthread +LIB_NAME = DXFeed +LIB = lib$(LIB_NAME).so +LIB_TARGET = $(BIN)/$(LIB) +COMMAND_LINE_SAMPLE = CommandLineSample +COMMAND_LINE_SAMPLE_TARGET = $(BIN)/$(COMMAND_LINE_SAMPLE) +CANDLE_SAMPLE = CandleSample +CANDLE_SAMPLE_TARGET = $(BIN)/$(CANDLE_SAMPLE) +SNAPSHOT_CONSOLE_SAMPLE = SnapshotConsoleSample +SNAPSHOT_CONSOLE_SAMPLE_TARGET = $(BIN)/$(SNAPSHOT_CONSOLE_SAMPLE) +INC_SNAPSHOT_CONSOLE_SAMPLE = IncSnapshotConsoleSample +INC_SNAPSHOT_CONSOLE_SAMPLE_TARGET = $(BIN)/$(INC_SNAPSHOT_CONSOLE_SAMPLE) +PRICE_LEVEL_BOOK_SAMPLE = PriceLevelBookSample +PRICE_LEVEL_BOOK_SAMPLE_TARGET = $(BIN)/$(PRICE_LEVEL_BOOK_SAMPLE) +REGIONAL_BOOK_SAMPLE = RegionalBookSample +REGIONAL_BOOK_SAMPLE_TARGET = $(BIN)/$(REGIONAL_BOOK_SAMPLE) + +all: $(LIB_TARGET) $(COMMAND_LINE_SAMPLE_TARGET) $(CANDLE_SAMPLE_TARGET) \ + $(SNAPSHOT_CONSOLE_SAMPLE_TARGET) \ + $(INC_SNAPSHOT_CONSOLE_SAMPLE_TARGET) \ + $(PRICE_LEVEL_BOOK_SAMPLE_TARGET) $(REGIONAL_BOOK_SAMPLE_TARGET) + +lib: $(LIB_TARGET) + +clean: + rm -f $(BIN)/*.so && rm -f $(OBJ)/*.o + +# Common + +Prepare: + mkdir -p obj && mkdir -p bin + +# DXFeed library + +LIB_CFLAGS = $(CFLAGS) $(COMMON_CFLAGS) -I../src +LIB_LDFLAGS = $(LD_FLAGS) $(COMMON_LDFLAGS) -lrt + +OBJS = \ + $(OBJ)/BufferedInput.c.o \ + $(OBJ)/BufferedIOCommon.c.o \ + $(OBJ)/BufferedOutput.c.o \ + $(OBJ)/Candle.c.o \ + $(OBJ)/ClientMessageProcessor.c.o \ + $(OBJ)/ConfigurationDeserializer.c.o \ + $(OBJ)/ConnectionContextData.c.o \ + $(OBJ)/DataStructures.c.o \ + $(OBJ)/Decimal.c.o \ + $(OBJ)/DXAddressParser.c.o \ + $(OBJ)/DXAlgorithms.c.o \ + $(OBJ)/DXErrorCodes.c.o \ + $(OBJ)/DXErrorHandling.c.o \ + $(OBJ)/DXFeed.c.o \ + $(OBJ)/DXMemory.c.o \ + $(OBJ)/DXNetwork.c.o \ + $(OBJ)/DXPMessageData.c.o \ + $(OBJ)/DXProperties.c.o \ + $(OBJ)/DXSockets.c.o \ + $(OBJ)/DXThreads.c.o \ + $(OBJ)/EventData.c.o \ + $(OBJ)/EventManager.c.o \ + $(OBJ)/EventSubscription.c.o \ + $(OBJ)/Linux.c.o \ + $(OBJ)/Logger.c.o \ + $(OBJ)/ObjectArray.c.o \ + $(OBJ)/PriceLevelBook.c.o \ + $(OBJ)/RecordBuffers.c.o \ + $(OBJ)/RecordFieldSetters.c.o \ + $(OBJ)/RecordTranscoder.c.o \ + $(OBJ)/RegionalBook.c.o \ + $(OBJ)/ServerMessageProcessor.c.o \ + $(OBJ)/Snapshot.c.o \ + $(OBJ)/SymbolCodec.c.o \ + $(OBJ)/TaskQueue.c.o \ + $(OBJ)/TestParser.c.o \ + $(OBJ)/Version.c.o + +$(LIB_TARGET): Prepare $(OBJS) + $(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS) -G -o $(LIB_TARGET) $(OBJS) + +$(OBJ)/BufferedInput.c.o: ../src/BufferedInput.c ../include/DXFeed.h \ + ../src/BufferedInput.h ../src/DXErrorHandling.h ../src/DXMemory.h \ + ../src/DXAlgorithms.h ../src/ConnectionContextData.h + $(CC) $(LIB_CFLAGS) ../src/BufferedInput.c -c -o ./$@ + +$(OBJ)/BufferedIOCommon.c.o: ../src/BufferedIOCommon.c \ + ../src/BufferedIOCommon.h ../src/DXErrorHandling.h ../src/DXMemory.h + $(CC) $(LIB_CFLAGS) ../src/BufferedIOCommon.c -c -o ./$@ + +$(OBJ)/BufferedOutput.c.o: ../src/BufferedOutput.c ../include/DXFeed.h \ + ../src/BufferedOutput.h ../src/DXErrorHandling.h ../src/DXMemory.h \ + ../src/DXAlgorithms.h ../src/DXThreads.h ../src/ConnectionContextData.h + $(CC) $(LIB_CFLAGS) ../src/BufferedOutput.c -c -o $@ + +$(OBJ)/Candle.c.o: + $(CC) $(LIB_CFLAGS) ../src/Candle.c -c -o $@ + +$(OBJ)/ClientMessageProcessor.c.o: + $(CC) $(LIB_CFLAGS) ../src/ClientMessageProcessor.c -c -o $@ + +$(OBJ)/ConfigurationDeserializer.c.o: + $(CC) $(LIB_CFLAGS) ../src/ConfigurationDeserializer.c -c -o $@ + +$(OBJ)/ConnectionContextData.c.o: + $(CC) $(LIB_CFLAGS) ../src/ConnectionContextData.c -c -o $@ + +$(OBJ)/DataStructures.c.o: + $(CC) $(LIB_CFLAGS) ../src/DataStructures.c -c -o $@ + +$(OBJ)/Decimal.c.o: + $(CC) $(LIB_CFLAGS) ../src/Decimal.c -c -o $@ + +$(OBJ)/DXAddressParser.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXAddressParser.c -c -o $@ + +$(OBJ)/DXAlgorithms.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXAlgorithms.c -c -o $@ + +$(OBJ)/DXErrorCodes.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXErrorCodes.c -c -o $@ + +$(OBJ)/DXErrorHandling.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXErrorHandling.c -c -o $@ + +$(OBJ)/DXFeed.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXFeed.c -c -o $@ + +$(OBJ)/DXMemory.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXMemory.c -c -o $@ + +$(OBJ)/DXNetwork.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXNetwork.c -c -o $@ + +$(OBJ)/DXPMessageData.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXPMessageData.c -c -o $@ + +$(OBJ)/DXProperties.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXProperties.c -c -o $@ + +$(OBJ)/DXSockets.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXSockets.c -c -o $@ + +$(OBJ)/DXThreads.c.o: + $(CC) $(LIB_CFLAGS) ../src/DXThreads.c -c -o $@ + +$(OBJ)/EventData.c.o: + $(CC) $(LIB_CFLAGS) ../src/EventData.c -c -o $@ + +$(OBJ)/EventManager.c.o: + $(CC) $(LIB_CFLAGS) ../src/EventManager.c -c -o $@ + +$(OBJ)/EventSubscription.c.o: + $(CC) $(LIB_CFLAGS) ../src/EventSubscription.c -c -o $@ + +$(OBJ)/Linux.c.o: + $(CC) $(LIB_CFLAGS) ../src/Linux.c -c -o $@ + +$(OBJ)/Logger.c.o: + $(CC) $(LIB_CFLAGS) ../src/Logger.c -c -o $@ + +$(OBJ)/ObjectArray.c.o: + $(CC) $(LIB_CFLAGS) ../src/ObjectArray.c -c -o $@ + +$(OBJ)/PriceLevelBook.c.o: + $(CC) $(LIB_CFLAGS) ../src/PriceLevelBook.c -c -o $@ + +$(OBJ)/RecordBuffers.c.o: + $(CC) $(LIB_CFLAGS) ../src/RecordBuffers.c -c -o $@ + +$(OBJ)/RecordFieldSetters.c.o: + $(CC) $(LIB_CFLAGS) ../src/RecordFieldSetters.c -c -o $@ + +$(OBJ)/RecordTranscoder.c.o: + $(CC) $(LIB_CFLAGS) ../src/RecordTranscoder.c -c -o $@ + +$(OBJ)/RegionalBook.c.o: + $(CC) $(LIB_CFLAGS) ../src/RegionalBook.c -c -o $@ + +$(OBJ)/ServerMessageProcessor.c.o: + $(CC) $(LIB_CFLAGS) ../src/ServerMessageProcessor.c -c -o $@ + +$(OBJ)/Snapshot.c.o: + $(CC) $(LIB_CFLAGS) ../src/Snapshot.c -c -o $@ + +$(OBJ)/SymbolCodec.c.o: + $(CC) $(LIB_CFLAGS) ../src/SymbolCodec.c -c -o $@ + +$(OBJ)/TaskQueue.c.o: + $(CC) $(LIB_CFLAGS) ../src/TaskQueue.c -c -o $@ + +$(OBJ)/TestParser.c.o: + $(CC) $(LIB_CFLAGS) ../src/TestParser.c -c -o $@ + +$(OBJ)/Version.c.o: + $(CC) $(LIB_CFLAGS) ../src/Version.c -c -o $@ + +# Samples + +SAMPLES_CFLAGS = $(CFLAGS) $(COMMON_CFLAGS) -I../src +SAMPLES_LDFLAGS = $(LDFLAGS) $(COMMON_LDFLAGS) -L$(BIN) -l$(LIB_NAME) + +$(CANDLE_SAMPLE_TARGET): $(OBJ)/CandleSample.c.o + $(CC) $(SAMPLES_CFLAGS) $(SAMPLES_LDFLAGS) -o $@ $(OBJ)/CandleSample.c.o + +$(OBJ)/CandleSample.c.o: ../tests/CandleSample/CandleSample.c ../include/DXFeed.h ../include/DXErrorCodes.h + $(CC) $(SAMPLES_CFLAGS) ../tests/CandleSample/CandleSample.c -c -o $@ + +$(COMMAND_LINE_SAMPLE_TARGET): $(OBJ)/CommandLineSample.c.o + $(CC) $(SAMPLES_CFLAGS) $(SAMPLES_LDFLAGS) -o $@ $(OBJ)/CommandLineSample.c.o + +$(OBJ)/CommandLineSample.c.o: ../tests/CommandLineSample/CommandLineSample.c ../include/DXFeed.h ../include/DXErrorCodes.h + $(CC) $(SAMPLES_CFLAGS) ../tests/CommandLineSample/CommandLineSample.c -c -o $@ + +$(SNAPSHOT_CONSOLE_SAMPLE_TARGET): $(OBJ)/SnapshotConsoleSample.c.o + $(CC) $(SAMPLES_CFLAGS) $(SAMPLES_LDFLAGS) -o $@ $(OBJ)/SnapshotConsoleSample.c.o + +$(OBJ)/SnapshotConsoleSample.c.o: ../tests/SnapshotConsoleSample/SnapshotConsoleSample.c ../include/DXFeed.h ../include/DXErrorCodes.h + $(CC) $(SAMPLES_CFLAGS) ../tests/SnapshotConsoleSample/SnapshotConsoleSample.c -c -o $@ + +$(INC_SNAPSHOT_CONSOLE_SAMPLE_TARGET): $(OBJ)/IncSnapshotConsoleSample.c.o + $(CC) $(SAMPLES_CFLAGS) $(SAMPLES_LDFLAGS) -o $@ $(OBJ)/IncSnapshotConsoleSample.c.o + +$(OBJ)/IncSnapshotConsoleSample.c.o: ../tests/IncSnapshotConsoleSample/IncSnapshotConsoleSample.c ../include/DXFeed.h ../include/DXErrorCodes.h + $(CC) $(SAMPLES_CFLAGS) ../tests/IncSnapshotConsoleSample/IncSnapshotConsoleSample.c -c -o $@ + +$(PRICE_LEVEL_BOOK_SAMPLE_TARGET): $(OBJ)/PriceLevelBookSample.c.o + $(CC) $(SAMPLES_CFLAGS) $(SAMPLES_LDFLAGS) -o $@ $(OBJ)/PriceLevelBookSample.c.o + +$(OBJ)/PriceLevelBookSample.c.o: ../tests/PriceLevelBookSample/PriceLevelBookSample.c ../include/DXFeed.h ../include/DXErrorCodes.h + $(CC) $(SAMPLES_CFLAGS) ../tests/PriceLevelBookSample/PriceLevelBookSample.c -c -o $@ + +$(REGIONAL_BOOK_SAMPLE_TARGET): $(OBJ)/RegionalBookSample.c.o + $(CC) $(SAMPLES_CFLAGS) $(SAMPLES_LDFLAGS) -o $@ $(OBJ)/RegionalBookSample.c.o + +$(OBJ)/RegionalBookSample.c.o: ../tests/RegionalBookSample/RegionalBookSample.c ../include/DXFeed.h ../include/DXErrorCodes.h + $(CC) $(SAMPLES_CFLAGS) ../tests/RegionalBookSample/RegionalBookSample.c -c -o $@ +