From d69bb7d05abf4ba9766a943a94ffd22767f7a66d Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Sat, 14 May 2022 20:06:17 +0200 Subject: [PATCH] Use environment variables for CC and PREFIX Pull request #3 can break the compilation process. In my case, cc points to gcc which cannot handle the `-G_DISABLE_DEPRECATED` and the `-GDK_PIXBUF_DISABLE_DEPRECATED` command-line options whereas clang works like a charm. This commit allows the user to use whichever compiler they want through environment variables such as: CC=clang make all It also allows the user to define their preferred prefix with environment variables: PREFIX=$HOME/.local/bin make install --- makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 9c3aed4..e13e331 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,5 @@ -CC = cc +# -*- indent-tabs-mode: t -*- +CC ?= cc CFLAGS = `pkg-config --cflags gtk4 webkit2gtk-5.0 x11` LIBS = `pkg-config --libs gtk4 webkit2gtk-5.0 x11` OPTIONS = -Dgtk_doc=false -Dintrospection=false \ @@ -16,7 +17,7 @@ OPTIONS = -Dgtk_doc=false -Dintrospection=false \ -Db_coverage=false \ -Ddebug=false -PREFIX=/usr/local +PREFIX ?= /usr/local all: $(CC) -fPIC -O3 -o rose *.c $(CFLAGS) $(LIBS) $(OPTIONS)