updated build for macos
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 10s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Successful in 13s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Successful in 11s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make-Without-sqlite3 (push) Successful in 9s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake-Without-sqlite3 (push) Successful in 14s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson-Without-sqlite3 (push) Successful in 11s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 10s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Successful in 13s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Successful in 11s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make-Without-sqlite3 (push) Successful in 9s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake-Without-sqlite3 (push) Successful in 14s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson-Without-sqlite3 (push) Successful in 11s
This commit is contained in:
1 parent
39ef249f6f
commit
faeb9ff052
3 files changed
+14
-3
No files matched your search
+4
-1
@@ -4,7 +4,10 @@ project(auth_service LANGUAGES C)
|
|||||||
set(CMAKE_C_STANDARD 23)
|
set(CMAKE_C_STANDARD 23)
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
set(CMAKE_C_FLAGS "-ffunction-sections -fdata-sections")
|
set(CMAKE_C_FLAGS "-ffunction-sections -fdata-sections")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections")
|
if (APPLE)
|
||||||
|
elseif (UNIX)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections")
|
||||||
|
endif()
|
||||||
|
|
||||||
include_directories(./src/lib/ ${SQLite3_INCLUDE_DIRS})
|
include_directories(./src/lib/ ${SQLite3_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -Wall -g -std=gnu2x -DMG_TLS=MG_TLS_OPENSSL -ffunction-sections -fdata-sections
|
CFLAGS = -Wall -g -std=gnu2x -DMG_TLS=MG_TLS_OPENSSL -ffunction-sections -fdata-sections
|
||||||
LDFLAGS = -Wl,--gc-sections
|
LDFLAGS =
|
||||||
INCLUDES = -I./src/lib -I./src
|
INCLUDES = -I./src/lib -I./src
|
||||||
SRCS = $(wildcard src/lib/*.c src/file_db/*.c src/*.c)
|
SRCS = $(wildcard src/lib/*.c src/file_db/*.c src/*.c)
|
||||||
OBJS = $(SRCS:.c=.o)
|
OBJS = $(SRCS:.c=.o)
|
||||||
@@ -11,6 +11,10 @@ LIBS = -lpthread -lcrypto -lssl
|
|||||||
USE_SQLITE3 ?= 0
|
USE_SQLITE3 ?= 0
|
||||||
WERROR ?= 0
|
WERROR ?= 0
|
||||||
|
|
||||||
|
ifeq ($(shell uname), Linux)
|
||||||
|
LDFLAGS += -Wl,--gc-sections
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_SQLITE3), 1)
|
ifeq ($(USE_SQLITE3), 1)
|
||||||
CFLAGS += -DUSE_SQLITE3
|
CFLAGS += -DUSE_SQLITE3
|
||||||
LIBS += -lsqlite3
|
LIBS += -lsqlite3
|
||||||
|
|||||||
+5
-1
@@ -2,7 +2,11 @@ project('auth_service', 'c', default_options: ['c_std=gnu2x'])
|
|||||||
include_dirs = include_directories('src', 'src/lib')
|
include_dirs = include_directories('src', 'src/lib')
|
||||||
deps = [dependency('openssl')]
|
deps = [dependency('openssl')]
|
||||||
extra_c_args = ['-ffunction-sections', '-fdata-sections']
|
extra_c_args = ['-ffunction-sections', '-fdata-sections']
|
||||||
extra_c_link_args = ['-Wl,--gc-sections']
|
extra_c_link_args = []
|
||||||
|
system = host_machine.system()
|
||||||
|
if system == 'linux'
|
||||||
|
extra_c_link_args += ['-Wl,--gc-sections']
|
||||||
|
endif
|
||||||
|
|
||||||
sqlite3_dep = dependency('sqlite3', required: false)
|
sqlite3_dep = dependency('sqlite3', required: false)
|
||||||
use_sqlite3 = get_option('use_sqlite3')
|
use_sqlite3 = get_option('use_sqlite3')
|
||||||
|
|||||||
Reference in new issue
Block a user