shithub: orca

Download patch

ref: cdd8a7bc2363ab0bd1149e732e315f719e561aa4
parent: 1bf43eacb929e0651f854f038fba83feced2a9e9
author: cancel <cancel@cancel.fm>
date: Sat Nov 24 03:47:00 EST 2018

Add example release target

--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
-basic_flags := -std=c99 -Wall -Wpedantic -Wextra
+basic_flags := -std=c99 -Wall -Wpedantic -Wextra -pipe
 debug_flags := -DDEBUG -O0 -ggdb -feliminate-unused-debug-symbols
+release_flags := -DNDEBUG -O2 -s -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fpie -Wl,-pie
 library_flags := -lncurses
 source_files := main.c
 
@@ -14,6 +15,10 @@
 .PHONY: debug
 debug: | build/debug
 	cc $(basic_flags) $(debug_flags) $(source_files) -o build/debug/acro $(library_flags)
+
+.PHONY: release
+release: | build/release
+	cc $(basic_flags) $(release_flags) $(source_files) -o build/release/acro $(library_flags)
 
 .PHONY: clean
 clean: