summaryrefslogtreecommitdiff
path: root/Makefile
blob: 4bd922c95b503d8f9c4ba63986e6e6666de11fd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
CC=gcc
CFLAGS=-Wall -Wextra -std=c99 -O2
TARGET=jelly-cms
SOURCE=main.c

# Default target
$(TARGET): $(SOURCE)
	$(CC) $(CFLAGS) -o $(TARGET) $(SOURCE)

# Clean build artifacts
clean:
	rm -f $(TARGET)
	rm -rf build

# Install (copy to /usr/local/bin)
install: $(TARGET)
	sudo cp $(TARGET) /usr/local/bin/

# Uninstall
uninstall:
	sudo rm -f /usr/local/bin/$(TARGET)

# Test build (run build command)
test: $(TARGET)
	./$(TARGET) build

# Help
help:
	@echo "Available targets:"
	@echo "  $(TARGET)    - Build the jelly-cms executable"
	@echo "  clean       - Remove build artifacts and executable"
	@echo "  install     - Install jelly-cms to /usr/local/bin"
	@echo "  uninstall   - Remove jelly-cms from /usr/local/bin"
	@echo "  test        - Build and run jelly-cms build command"
	@echo "  help        - Show this help message"

.PHONY: clean install uninstall test help