Skip to content

Commit 9915ade

Browse files
committed
#7 beginnings of a C async & query api
1 parent b1c3080 commit 9915ade

23 files changed

+1365
-220
lines changed

Rakefile

+2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ task :default do
55
args = {
66
:license_file => './src/license/header',
77
:add_path => 'src/influxdb-cpp-rest',
8+
:add_path => 'src/influx-c-rest',
89
:add_path => 'src/demo',
910
:add_path => 'src/test',
11+
:add_path => 'src/test-shared',
1012
:add_path => 'src/auth_test',
1113
:output_dir => '.'
1214
}

build/linux/gmake/Makefile

+27-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# GNU Make solution makefile autogenerated by Premake
2-
3-
.NOTPARALLEL:
1+
# GNU Make workspace makefile autogenerated by Premake
42

53
ifndef config
64
config=debug_x32
@@ -13,33 +11,41 @@ endif
1311
ifeq ($(config),debug_x32)
1412
fmt_config = debug_x32
1513
influxdb_cpp_rest_config = debug_x32
14+
influx_c_rest_config = debug_x32
1615
demo_config = debug_x32
16+
test_influxdb_c_rest_config = debug_x32
1717
test_influxdb_cpp_rest_config = debug_x32
1818
test_influxdb_cpp_auth_config = debug_x32
1919
endif
2020
ifeq ($(config),debug_x64)
2121
fmt_config = debug_x64
2222
influxdb_cpp_rest_config = debug_x64
23+
influx_c_rest_config = debug_x64
2324
demo_config = debug_x64
25+
test_influxdb_c_rest_config = debug_x64
2426
test_influxdb_cpp_rest_config = debug_x64
2527
test_influxdb_cpp_auth_config = debug_x64
2628
endif
2729
ifeq ($(config),release_x32)
2830
fmt_config = release_x32
2931
influxdb_cpp_rest_config = release_x32
32+
influx_c_rest_config = release_x32
3033
demo_config = release_x32
34+
test_influxdb_c_rest_config = release_x32
3135
test_influxdb_cpp_rest_config = release_x32
3236
test_influxdb_cpp_auth_config = release_x32
3337
endif
3438
ifeq ($(config),release_x64)
3539
fmt_config = release_x64
3640
influxdb_cpp_rest_config = release_x64
41+
influx_c_rest_config = release_x64
3742
demo_config = release_x64
43+
test_influxdb_c_rest_config = release_x64
3844
test_influxdb_cpp_rest_config = release_x64
3945
test_influxdb_cpp_auth_config = release_x64
4046
endif
4147

42-
PROJECTS := fmt influxdb-cpp-rest demo test-influxdb-cpp-rest test-influxdb-cpp-auth
48+
PROJECTS := fmt influxdb-cpp-rest influx-c-rest demo test-influxdb-c-rest test-influxdb-cpp-rest test-influxdb-cpp-auth
4349

4450
.PHONY: all clean help $(PROJECTS)
4551

@@ -57,12 +63,24 @@ ifneq (,$(influxdb_cpp_rest_config))
5763
@${MAKE} --no-print-directory -C . -f influxdb-cpp-rest.make config=$(influxdb_cpp_rest_config)
5864
endif
5965

66+
influx-c-rest: influxdb-cpp-rest fmt
67+
ifneq (,$(influx_c_rest_config))
68+
@echo "==== Building influx-c-rest ($(influx_c_rest_config)) ===="
69+
@${MAKE} --no-print-directory -C . -f influx-c-rest.make config=$(influx_c_rest_config)
70+
endif
71+
6072
demo: influxdb-cpp-rest fmt
6173
ifneq (,$(demo_config))
6274
@echo "==== Building demo ($(demo_config)) ===="
6375
@${MAKE} --no-print-directory -C . -f demo.make config=$(demo_config)
6476
endif
6577

78+
test-influxdb-c-rest: influx-c-rest fmt
79+
ifneq (,$(test_influxdb_c_rest_config))
80+
@echo "==== Building test-influxdb-c-rest ($(test_influxdb_c_rest_config)) ===="
81+
@${MAKE} --no-print-directory -C . -f test-influxdb-c-rest.make config=$(test_influxdb_c_rest_config)
82+
endif
83+
6684
test-influxdb-cpp-rest: influxdb-cpp-rest fmt
6785
ifneq (,$(test_influxdb_cpp_rest_config))
6886
@echo "==== Building test-influxdb-cpp-rest ($(test_influxdb_cpp_rest_config)) ===="
@@ -78,7 +96,9 @@ endif
7896
clean:
7997
@${MAKE} --no-print-directory -C . -f fmt.make clean
8098
@${MAKE} --no-print-directory -C . -f influxdb-cpp-rest.make clean
99+
@${MAKE} --no-print-directory -C . -f influx-c-rest.make clean
81100
@${MAKE} --no-print-directory -C . -f demo.make clean
101+
@${MAKE} --no-print-directory -C . -f test-influxdb-c-rest.make clean
82102
@${MAKE} --no-print-directory -C . -f test-influxdb-cpp-rest.make clean
83103
@${MAKE} --no-print-directory -C . -f test-influxdb-cpp-auth.make clean
84104

@@ -96,8 +116,10 @@ help:
96116
@echo " clean"
97117
@echo " fmt"
98118
@echo " influxdb-cpp-rest"
119+
@echo " influx-c-rest"
99120
@echo " demo"
121+
@echo " test-influxdb-c-rest"
100122
@echo " test-influxdb-cpp-rest"
101123
@echo " test-influxdb-cpp-auth"
102124
@echo ""
103-
@echo "For more information, see http://industriousone.com/premake/quick-start"
125+
@echo "For more information, see http://industriousone.com/premake/quick-start"

build/linux/gmake/demo.make

+20-20
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ ifeq ($(config),debug_x32)
1616
TARGET = $(TARGETDIR)/demo
1717
OBJDIR = ../../../obj/linux/gmake/x32/Debug/demo
1818
DEFINES += -D_DEBUG
19-
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
19+
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I../../../src/influxdb-c-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
2020
FORCE_INCLUDE +=
2121
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
22-
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -m32 -std=c++14
23-
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
22+
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -fPIC -g -std=c++14
23+
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m32 -fPIC -g -std=c++14
2424
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
2525
LIBS += ../../../bin/linux/gmake/x32/Debug/libinfluxdb-cpp-rest.a ../../../bin/linux/gmake/x32/Debug/libfmt.a -lssl -lcrypto -lboost_random -lboost_chrono -lboost_thread-mt -lboost_system-mt -lboost_regex -lboost_filesystem -lcpprest -lpthread
2626
LDDEPS += ../../../bin/linux/gmake/x32/Debug/libinfluxdb-cpp-rest.a ../../../bin/linux/gmake/x32/Debug/libfmt.a
2727
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/lib -L/home/linuxbrew/.linuxbrew/lib64 -m32
28-
LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
28+
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
2929
define PREBUILDCMDS
3030
endef
3131
define PRELINKCMDS
@@ -43,16 +43,16 @@ ifeq ($(config),debug_x64)
4343
TARGET = $(TARGETDIR)/demo
4444
OBJDIR = ../../../obj/linux/gmake/x64/Debug/demo
4545
DEFINES += -D_DEBUG
46-
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
46+
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I../../../src/influxdb-c-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
4747
FORCE_INCLUDE +=
4848
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
49-
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -m64 -std=c++14
50-
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
49+
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -fPIC -g -std=c++14
50+
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m64 -fPIC -g -std=c++14
5151
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
5252
LIBS += ../../../bin/linux/gmake/x64/Debug/libinfluxdb-cpp-rest.a ../../../bin/linux/gmake/x64/Debug/libfmt.a -lssl -lcrypto -lboost_random -lboost_chrono -lboost_thread-mt -lboost_system-mt -lboost_regex -lboost_filesystem -lcpprest -lpthread
5353
LDDEPS += ../../../bin/linux/gmake/x64/Debug/libinfluxdb-cpp-rest.a ../../../bin/linux/gmake/x64/Debug/libfmt.a
5454
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/lib -L/home/linuxbrew/.linuxbrew/lib64 -m64
55-
LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
55+
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
5656
define PREBUILDCMDS
5757
endef
5858
define PRELINKCMDS
@@ -70,16 +70,16 @@ ifeq ($(config),release_x32)
7070
TARGET = $(TARGETDIR)/demo
7171
OBJDIR = ../../../obj/linux/gmake/x32/Release/demo
7272
DEFINES +=
73-
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
73+
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I../../../src/influxdb-c-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
7474
FORCE_INCLUDE +=
7575
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
76-
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2 -std=c++14
77-
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
76+
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2 -fPIC -std=c++14
77+
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m32 -O2 -fPIC -std=c++14
7878
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
7979
LIBS += ../../../bin/linux/gmake/x32/Release/libinfluxdb-cpp-rest.a ../../../bin/linux/gmake/x32/Release/libfmt.a -lssl -lcrypto -lboost_random -lboost_chrono -lboost_thread-mt -lboost_system-mt -lboost_regex -lboost_filesystem -lcpprest -lpthread
8080
LDDEPS += ../../../bin/linux/gmake/x32/Release/libinfluxdb-cpp-rest.a ../../../bin/linux/gmake/x32/Release/libfmt.a
81-
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/lib -L/home/linuxbrew/.linuxbrew/lib64 -s -m32
82-
LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
81+
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/lib -L/home/linuxbrew/.linuxbrew/lib64 -m32 -s
82+
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
8383
define PREBUILDCMDS
8484
endef
8585
define PRELINKCMDS
@@ -97,16 +97,16 @@ ifeq ($(config),release_x64)
9797
TARGET = $(TARGETDIR)/demo
9898
OBJDIR = ../../../obj/linux/gmake/x64/Release/demo
9999
DEFINES +=
100-
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
100+
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I../../../src/influxdb-c-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
101101
FORCE_INCLUDE +=
102102
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
103-
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2 -std=c++14
104-
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
103+
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2 -fPIC -std=c++14
104+
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m64 -O2 -fPIC -std=c++14
105105
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
106106
LIBS += ../../../bin/linux/gmake/x64/Release/libinfluxdb-cpp-rest.a ../../../bin/linux/gmake/x64/Release/libfmt.a -lssl -lcrypto -lboost_random -lboost_chrono -lboost_thread-mt -lboost_system-mt -lboost_regex -lboost_filesystem -lcpprest -lpthread
107107
LDDEPS += ../../../bin/linux/gmake/x64/Release/libinfluxdb-cpp-rest.a ../../../bin/linux/gmake/x64/Release/libfmt.a
108-
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/lib -L/home/linuxbrew/.linuxbrew/lib64 -s -m64
109-
LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
108+
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/lib -L/home/linuxbrew/.linuxbrew/lib64 -m64 -s
109+
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
110110
define PREBUILDCMDS
111111
endef
112112
define PRELINKCMDS
@@ -133,7 +133,7 @@ ifeq (/bin,$(findstring /bin,$(SHELL)))
133133
SHELLTYPE := posix
134134
endif
135135

136-
$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES) ${CUSTOMFILES}
136+
$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
137137
@echo Linking demo
138138
$(SILENT) $(LINKCMD)
139139
$(POSTBUILDCMDS)
@@ -184,4 +184,4 @@ $(OBJDIR)/main.o: ../../../src/demo/main.cpp
184184
-include $(OBJECTS:%.o=%.d)
185185
ifneq (,$(PCH))
186186
-include $(OBJDIR)/$(notdir $(PCH)).d
187-
endif
187+
endif

build/linux/gmake/fmt.make

+20-20
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ ifeq ($(config),debug_x32)
1616
TARGET = $(TARGETDIR)/libfmt.a
1717
OBJDIR = ../../../obj/linux/gmake/x32/Debug/fmt
1818
DEFINES += -D_DEBUG
19-
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
19+
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I../../../src/influxdb-c-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
2020
FORCE_INCLUDE +=
2121
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
22-
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -m32 -std=c++14
23-
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
22+
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -fPIC -g -std=c++14
23+
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m32 -fPIC -g -std=c++14
2424
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
2525
LIBS +=
2626
LDDEPS +=
2727
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/lib -L/home/linuxbrew/.linuxbrew/lib64 -m32
28-
LINKCMD = $(AR) -rcs $(TARGET) $(OBJECTS)
28+
LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
2929
define PREBUILDCMDS
3030
endef
3131
define PRELINKCMDS
@@ -43,16 +43,16 @@ ifeq ($(config),debug_x64)
4343
TARGET = $(TARGETDIR)/libfmt.a
4444
OBJDIR = ../../../obj/linux/gmake/x64/Debug/fmt
4545
DEFINES += -D_DEBUG
46-
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
46+
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I../../../src/influxdb-c-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
4747
FORCE_INCLUDE +=
4848
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
49-
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -m64 -std=c++14
50-
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
49+
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -fPIC -g -std=c++14
50+
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m64 -fPIC -g -std=c++14
5151
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
5252
LIBS +=
5353
LDDEPS +=
5454
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/lib -L/home/linuxbrew/.linuxbrew/lib64 -m64
55-
LINKCMD = $(AR) -rcs $(TARGET) $(OBJECTS)
55+
LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
5656
define PREBUILDCMDS
5757
endef
5858
define PRELINKCMDS
@@ -70,16 +70,16 @@ ifeq ($(config),release_x32)
7070
TARGET = $(TARGETDIR)/libfmt.a
7171
OBJDIR = ../../../obj/linux/gmake/x32/Release/fmt
7272
DEFINES +=
73-
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
73+
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I../../../src/influxdb-c-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
7474
FORCE_INCLUDE +=
7575
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
76-
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2 -std=c++14
77-
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
76+
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2 -fPIC -std=c++14
77+
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m32 -O2 -fPIC -std=c++14
7878
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
7979
LIBS +=
8080
LDDEPS +=
81-
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/lib -L/home/linuxbrew/.linuxbrew/lib64 -s -m32
82-
LINKCMD = $(AR) -rcs $(TARGET) $(OBJECTS)
81+
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -L/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/lib -L/home/linuxbrew/.linuxbrew/lib64 -m32 -s
82+
LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
8383
define PREBUILDCMDS
8484
endef
8585
define PRELINKCMDS
@@ -97,16 +97,16 @@ ifeq ($(config),release_x64)
9797
TARGET = $(TARGETDIR)/libfmt.a
9898
OBJDIR = ../../../obj/linux/gmake/x64/Release/fmt
9999
DEFINES +=
100-
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
100+
INCLUDES += -I../../../deps/fmt -I../../../deps/rxcpp/Rx/v2/src/rxcpp -I../../../src/influxdb-cpp-rest -I../../../src/influxdb-c-rest -I/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/include
101101
FORCE_INCLUDE +=
102102
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
103-
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2 -std=c++14
104-
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
103+
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2 -fPIC -std=c++14
104+
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m64 -O2 -fPIC -std=c++14
105105
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
106106
LIBS +=
107107
LDDEPS +=
108-
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/lib -L/home/linuxbrew/.linuxbrew/lib64 -s -m64
109-
LINKCMD = $(AR) -rcs $(TARGET) $(OBJECTS)
108+
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -L/home/linuxbrew/.linuxbrew/Cellar/cpprestsdk/2.9.1/lib -L/home/linuxbrew/.linuxbrew/lib64 -m64 -s
109+
LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
110110
define PREBUILDCMDS
111111
endef
112112
define PRELINKCMDS
@@ -136,7 +136,7 @@ ifeq (/bin,$(findstring /bin,$(SHELL)))
136136
SHELLTYPE := posix
137137
endif
138138

139-
$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES) ${CUSTOMFILES}
139+
$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES)
140140
@echo Linking fmt
141141
$(SILENT) $(LINKCMD)
142142
$(POSTBUILDCMDS)
@@ -196,4 +196,4 @@ $(OBJDIR)/printf.o: ../../../deps/fmt/fmt/printf.cc
196196
-include $(OBJECTS:%.o=%.d)
197197
ifneq (,$(PCH))
198198
-include $(OBJDIR)/$(notdir $(PCH)).d
199-
endif
199+
endif

0 commit comments

Comments
 (0)