summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
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."