Files
auth_service_c/Makefile
T
wt d14db43e9b
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 14s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Failing after 9s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Successful in 12s
updated file database added get_all_users get_user_by_id
get_user_by_username get_user_field_by_id
2025-10-22 16:46:36 +07:00

36 lines
722 B
Makefile

CC = gcc
CFLAGS = -Wall -g -std=gnu2x -DMG_TLS=MG_TLS_OPENSSL -ffunction-sections -fdata-sections
LDFLAGS = -Wl,--gc-sections
INCLUDES = -I./src/lib -I./src
SRCS = $(wildcard src/*/*.c src/*.c)
OBJS = $(SRCS:.c=.o)
TARGET = auth_service
BUILD_DIR=./build
CROSS_COMPILE =
LIBS = -lpthread -lcrypto -lssl
USE_SQLITE3 ?= 0
WERROR ?= 0
ifeq ($(USE_SQLITE3), 1)
CFLAGS += -DUSE_SQLITE3
LIBS += -lsqlite3
endif
ifeq ($(WERROR), 1)
CFLAGS += -Werror
endif
all: $(TARGET)
$(TARGET): $(OBJS)
$(CROSS_COMPILE)$(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
%.o: %.c
$(CROSS_COMPILE)$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
clean:
rm -f $(OBJS) $(TARGET) $(shell find . -type f -name '*.log') users.db
test: $(TARGET)
bash ./tests.sh