From ac5b102245d13d146c2edd6cd062d11cfa3eb3e1 Mon Sep 17 00:00:00 2001 From: Henrique Borges Date: Sat, 3 Dec 2022 18:50:41 -0300 Subject: [PATCH] Add static compilation rule to makefile --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 654e5e6..8b7aa27 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ CFLAGS = -Wall -Wextra -Werror -Wl,-z,now CFLAGS_RELEASE = ${CFLAGS} -O2 -s -D_FORTIFY_SOURCE=2 +CFLAGS_STATIC = ${CFLAGS} --static -s CFLAGS_DEBUG = ${CFLAGS} -O0 -g -fsanitize=undefined LIBS = -lcrypt CC = gcc @@ -7,6 +8,9 @@ CC = gcc all: rdo.c ${CC} ${CFLAGS_RELEASE} rdo.c -o rdo ${LIBS} +static: rdo.c + ${CC} ${CFLAGS_STATIC} rdo.c -o rdo ${LIBS} + debug: rdo.c ${CC} ${CFLAGS_DEBUG} rdo.c -o rdo ${LIBS}