From a8e9ee3b9b8d83fd0dbab22b5d8663154d09f110 Mon Sep 17 00:00:00 2001 From: Oskar Date: Thu, 7 Mar 2024 23:00:19 +0100 Subject: Makefile changes --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 87b4e9d..57e8a1b 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,14 @@ CC=gcc CFLAGS=-Wfatal-errors -Wall -Werror -Wextra -g -O2 -static CFLAGS_TESTBIN=-Wfatal-errors -Wall -Werror -Wextra -g -fsanitize=address +CFLAGS_RELEASE=-O2 -flto -march=native -DNDEBUG -fomit-frame-pointer -s -static TARGET=7ed TESTTARGET=7ed-TESTING INSTALL_DIRECTORY=/usr/local/bin MAKEFLAGS += -s all: 7ed -7ed: +default: echo "CC 7ed.c functions.c startmode.c editmode.c ---> $(TARGET)" $(CC) $(CFLAGS) 7ed.c functions.c startmode.c editmode.c -o $(TARGET) echo "$(TARGET) is done. Run 'make install' as root to install it" @@ -26,3 +27,7 @@ install: cp $(TARGET) $(INSTALL_DIRECTORY) echo "$(TARGET) was installed to $(INSTALL_DIRECTORY)" +7ed: + echo "CC 7ed.c functions.c startmode.c editmode.c ---> $(TARGET)" + $(CC) $(CFLAGS_RELEASE) 7ed.c functions.c startmode.c editmode.c -o $(TARGET) + echo "$(TARGET) is done." -- cgit v1.2.3