/posts.json implemented

This commit is contained in:
2026-02-06 20:52:29 +00:00
commit e2b04277a8
6 changed files with 271 additions and 0 deletions

39
makefile Normal file
View File

@@ -0,0 +1,39 @@
# Compiler and linker settings
CXX = gcc
LDFLAGS = `curl-config --libs` -lssl -lcrypto
CXXFLAGS = -pedantic -std=c23 -I include `curl-config --cflags`
# Source and object files
SRC = $(wildcard src/*.c)
OBJ = $(addprefix build/, $(notdir $(SRC:.c=.o)))
# Target executable
TARGET = build/x86_64/main.x86_64
# Default target
all: clean dirs $(TARGET)
# development target with debugging
dev: CXXFLAGS += -g
dev: all
# Release target
release: CXXFLAGS += -O3
release: all
# Create build directory if it doesn't exist
dirs:
@mkdir -p build/x86_64
# Build target
$(TARGET): $(OBJ)
$(CXX) -o $@ $^ $(LDFLAGS)
# Build object files
build/%.o: src/%.c
$(CXX) -c -o $@ $< $(CXXFLAGS)
# Clean up build files
clean:
@rm -f $(OBJ) $(TARGET)
@echo "Cleaned up build files."