From bb0bd6c78511de5c6866b44ae00e3afb9a0b3c1a Mon Sep 17 00:00:00 2001 From: Huck Boles Date: Thu, 18 May 2023 14:02:54 -0500 Subject: [PATCH] fix: makefile for release build --- Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 38cc393..8a27493 100644 --- a/Makefile +++ b/Makefile @@ -3,20 +3,20 @@ VERSION ?= 0.0.1 SHELL = /bin/bash -DESTDIR ?= +DESTDIR ?= PREFIX ?= $(DESTDIR)/usr BINDIR ?= $(PREFIX)/bin LIBDIR ?= $(PREFIX)/lib MANDIR ?= $(PREFIX)/share/man/man1 -FILES ?= $(wildcard *.c) +FILES ?= $(wildcard *.c) HEADERS ?= $(wildcard *.h) OBJECTS ?= $(wildcard *.o) CC ?= gcc CFLAGS += -O2 -std=c17 -pipe -WARNINGS ?= -Werror -Wall -Wextra -Wpedantic -Wno-unused -CPPFLAGS += -I . +WARNINGS ?= -Wall -Wextra -Wpedantic -Wno-unused +CPPFLAGS += -I . LDFLAGS += -L . LDLIBS += -lm ALL_FLAGS = $(CPPFLAGS) $(CFLAGS) $(WARNINGS) $(LDFLAGS) $(LDLIBS) @@ -51,7 +51,6 @@ debug: $(FILES) $(CC) $(FILES) $(ALL_FLAGS) -ggdb3 -Og -o $(PROG) .PHONY: clean -clean: +clean: [[ -f $(BINDIR)/$(PROG) ]] && rm $(BINDIR)/$(PROG) [[ -f $(PROG) ]] && rm $(PROG) - -- 2.45.2