commit a6d4094851714d3e1406fe9d50f4cc08d8c0ff1a
parent 27d38d3ba6fdf98c56cde7b9f41afc58d86741f8
Author: Malte Voos <malte@malvo.org>
Date: Mon, 23 Aug 2021 20:55:04 +0200
Make build and install parameters more configurable
This makes things a lot easier for people who need to cross-compile or
install the library in a different location.
Signed-off-by: Malte Voos <malte@malvo.org>
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,7 +1,7 @@
SOURCE_DIR = src/
INCLUDE_DIR = include/
-INSTALL_DIR = /usr/local/
+INSTALL_DIR ?= /usr/local/
LIBRARY = libgnunetchat.so
SOURCES = gnunet_chat_lib.c\
@@ -22,12 +22,12 @@ LIBRARIES = gnunetarm\
gnunetregex\
gnunetutil
-CC = gcc
-LD = gcc
-RM = rm
+CC ?= gcc
+LD ?= gcc
+RM ?= rm
-CFLAGS = -fPIC -pedantic -Wall -Wextra -march=native -ggdb3
-LDFLAGS = -shared
+CFLAGS += -fPIC -pedantic -Wall -Wextra -march=native -ggdb3
+LDFLAGS += -shared
DEBUGFLAGS = -O0 -D _DEBUG
RELEASEFLAGS = -O2 -D NDEBUG