Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make-Without-sqlite3 (push) Successful in 6s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake-Without-sqlite3 (push) Successful in 9s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson-Without-sqlite3 (push) Successful in 7s
37 lines
775 B
Makefile
37 lines
775 B
Makefile
CC = gcc
|
|
CFLAGS = -Wall -g -std=gnu2x -ffunction-sections -fdata-sections
|
|
# -DMG_TLS=MG_TLS_OPENSSL
|
|
LDFLAGS =
|
|
INCLUDES = -I./src/lib -I./src
|
|
SRCS = $(wildcard src/lib/*.c src/file_db/*.c src/*.c src/config/*.c src/database/*.c src/api/*.c src/security/*.c src/utils/*.c)
|
|
OBJS = $(SRCS:.c=.o)
|
|
TARGET = wterm
|
|
BUILD_DIR=./build
|
|
CROSS_COMPILE =
|
|
LIBS = -lpthread
|
|
# -lcrypto -lssl
|
|
USE_SQLITE3 ?= 0
|
|
WERROR ?= 0
|
|
|
|
ifeq ($(shell uname), Linux)
|
|
LDFLAGS += -Wl,--gc-sections
|
|
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')
|
|
|
|
test: $(TARGET)
|
|
bash ./tests.sh
|