From 2e181319edb7ad9c0a6f08e5c1ae6c2b3c6cb626 Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Fri, 9 Jul 2021 23:43:40 +0200 Subject: [PATCH] make: resolve LDFLAGS based on system --- makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 84a0c0f..a865831 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,10 @@ +.POSIX: + CC ?= gcc CFLAGS = -Wall -pedantic --std=c99 -O2 DBG_CFLAGS = -Wall -Werror -pedantic --std=c99 -O0 -g -LDFLAGS != if [ "$(uname)" = 'Linux' ]; then printf '-lcrypt'; fi +SYSTEM != uname +LDFLAGS != if [ '${SYSTEM}' = 'Linux' ]; then echo '-lcrypt'; fi PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man