]> git.codecow.com Git - Monocypher.git/commitdiff
Restore "Do not hardcode Makefile variables"
authorLoup Vaillant <loup@loup-vaillant.fr>
Mon, 28 Aug 2023 20:28:27 +0000 (22:28 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Mon, 28 Aug 2023 20:28:27 +0000 (22:28 +0200)
What was not working on NixOs works out of the box on Ubuntu.
Who knows why.

This reverts commit 2a9b0d19cb4c6b18150fcf29da1e0d74ee47bbf0.

makefile
tests/gen/makefile
tests/speed/makefile

index 6460b22b84ca459dbb50ebdb3393256a0cedc3ce..46f568cb2682fa91919f7933e3ab5b26905dacdf 100644 (file)
--- a/makefile
+++ b/makefile
 .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  \
index 800c6c08d058eb0bb3aa9446c9664f92869992b2..0adc51207b7a0d2c1c3470a5815a8e7a1fae3eb6 100644 (file)
@@ -49,8 +49,8 @@
 # You should have received a copy of the CC0 Public Domain Dedication along
 # with this software.  If not, see
 # <https://creativecommons.org/publicdomain/zero/1.0/>
-CC     = gcc -std=c99
-CFLAGS = -pedantic -Wall -Wextra
+CC     ?= gcc -std=c99
+CFLAGS ?= -pedantic -Wall -Wextra
 
 .PHONY: all clean
 
index 5eecac6f31ebd09167fa067889af705afc711ac7..a0944c9e25833f8d40cfabd48a3aeb22b76f08f6 100644 (file)
@@ -49,8 +49,8 @@
 # with this software.  If not, see
 # <https://creativecommons.org/publicdomain/zero/1.0/>
 
-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 \