From: Loup Vaillant Date: Mon, 28 Aug 2023 20:28:27 +0000 (+0200) Subject: Restore "Do not hardcode Makefile variables" X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=ea03ede807b9e51350c9c17e7c9da4b810cdd149;p=Monocypher.git Restore "Do not hardcode Makefile variables" What was not working on NixOs works out of the box on Ubuntu. Who knows why. This reverts commit 2a9b0d19cb4c6b18150fcf29da1e0d74ee47bbf0. --- diff --git a/makefile b/makefile index 6460b22..46f568c 100644 --- a/makefile +++ b/makefile @@ -52,14 +52,14 @@ .POSIX: .SUFFIXES: -CC=gcc -std=c99 -CFLAGS=-pedantic -Wall -Wextra -O3 -march=native -DESTDIR= -PREFIX=usr/local -LIBDIR=$(PREFIX)/lib -INCLUDEDIR=$(PREFIX)/include -PKGCONFIGDIR=$(LIBDIR)/pkgconfig -MANDIR=$(PREFIX)/share/man/man3 +CC?=gcc -std=c99 +CFLAGS?=-pedantic -Wall -Wextra -O3 -march=native +DESTDIR?= +PREFIX?=usr/local +LIBDIR?=$(PREFIX)/lib +INCLUDEDIR?=$(PREFIX)/include +PKGCONFIGDIR?=$(LIBDIR)/pkgconfig +MANDIR?=$(PREFIX)/share/man/man3 SONAME=libmonocypher.so.4 .PHONY: all library static-library dynamic-library \ diff --git a/tests/gen/makefile b/tests/gen/makefile index 800c6c0..0adc512 100644 --- a/tests/gen/makefile +++ b/tests/gen/makefile @@ -49,8 +49,8 @@ # You should have received a copy of the CC0 Public Domain Dedication along # with this software. If not, see # -CC = gcc -std=c99 -CFLAGS = -pedantic -Wall -Wextra +CC ?= gcc -std=c99 +CFLAGS ?= -pedantic -Wall -Wextra .PHONY: all clean diff --git a/tests/speed/makefile b/tests/speed/makefile index 5eecac6..a0944c9 100644 --- a/tests/speed/makefile +++ b/tests/speed/makefile @@ -49,8 +49,8 @@ # with this software. If not, see # -CC=gcc -std=gnu99 -CFLAGS= -pedantic -Wall -Wextra -O3 -march=native +CC?=gcc -std=gnu99 +CFLAGS?= -pedantic -Wall -Wextra -O3 -march=native .PHONY: speed speed-sodium speed-hydrogen speed-tweetnacl speed-c25519 \ speed-donna \