From 6b584537838dbce9d3d75b93228544cee6e2f805 Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Sun, 28 Dec 2025 23:38:02 +0100 Subject: Re-organize makefiles --- Makefile | 14 +++++++++----- src/Makefile | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 36563c1..5ae355e 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,14 @@ -export FTAG_ROOT := $(shell pwd) -export __CFLAGS := -std=c99 -Wall -DFTAG_ROOT=\"$(FTAG_ROOT)\" -D_POSIX_C_SOURCE=200809L -export __LIBS := $(shell pkg-config --libs sqlite3) - +export FTAG_ROOT ?= $(shell pwd) export PROG ?= ftag export CFLAGS ?= -O0 -g3 +export LDFLAGS ?= +export LIBS ?= + +export __CFLAGS := -std=c99 -Wall \ + -DFTAG_ROOT=\"$(FTAG_ROOT)\" \ + -D_POSIX_C_SOURCE=200809L \ + $(shell pkg-config --cflags sqlite3) +export __LIBS := $(shell pkg-config --libs sqlite3) all: $(PROG) @@ -12,6 +17,5 @@ $(PROG): clean: make -C src clean - rm -f $(PROG) .PHONY: all clean diff --git a/src/Makefile b/src/Makefile index c75db54..0c8782d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,6 +6,6 @@ main.o: main.c $(CC) $(__CFLAGS) $(CFLAGS) -c $< clean: - rm -f *.o $(PROG) + rm -f main.o $(PROG) .PHONY: clean -- cgit v1.2.3