initial commit
This commit is contained in:
commit
f3284c7436
13 files changed
+275
No files matched your search
@@ -0,0 +1,33 @@
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -g -std=gnu2x -ffunction-sections -fdata-sections
|
||||
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 = speedtest
|
||||
BUILD_DIR=./build
|
||||
CROSS_COMPILE =
|
||||
LIBS =
|
||||
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)
|
||||
|
||||
test: $(TARGET)
|
||||
bash ./tests.sh
|
||||
Reference in new issue
Block a user