Created makefile

This commit is contained in:
Tomas Rivera
2026-03-30 14:12:19 +02:00
parent 5f38052101
commit 0cbb5e58fd
4 changed files with 10 additions and 29 deletions
+1 -19
View File
@@ -1,35 +1,17 @@
# Makefile for the Notes Vault project
# Compiler
CC = gcc
# Source files
SRC = startup.c
# Output binary
TARGET = nvimnotes
# Compiler flags
CFLAGS = -Wall -O2 `pkg-config --cflags libcjson ncurses`
# Linker flags
LDFLAGS = `pkg-config --libs libcjson ncurses`
# Debug mode
DEBUG ?= 0
ifeq ($(DEBUG),1)
CFLAGS += -g
CFLAGS += -g
endif
.PHONY: all clean run
all: $(TARGET)
$(TARGET): $(SRC)
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
run: $(TARGET)
./$(TARGET)
clean:
rm -f $(TARGET)