first version

This commit is contained in:
Syntax
2025-11-10 12:12:32 -03:00
parent a9820ff5a1
commit 51912b4b59
4 changed files with 296 additions and 1 deletions

35
Makefile Normal file
View File

@@ -0,0 +1,35 @@
# ------------------------------
# Neocities CLI Makefile (Portable)
# ------------------------------
# Default compiler
CC ?= gcc
# Compiler flags
CFLAGS ?= -Wall -O2 -Iinclude
# Libraries
LIBS ?= -lcurl -ljansson
# Source and target
SRC = src/main.c
BIN = neocities
# Detect Windows (MSYS2 / MinGW)
ifeq ($(OS),Windows_NT)
RM = del /Q
BIN_EXT = .exe
else
RM = rm -f
BIN_EXT =
endif
# Build executable
all: $(BIN)$(BIN_EXT)
$(BIN)$(BIN_EXT): $(SRC)
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
# Clean build files
clean:
$(RM) $(BIN)$(BIN_EXT)