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
This commit is contained in:
parent
e66bc2d5ab
commit
d69bb7d05a
5
makefile
5
makefile
|
@ -1,4 +1,5 @@
|
||||||
CC = cc
|
# -*- indent-tabs-mode: t -*-
|
||||||
|
CC ?= cc
|
||||||
CFLAGS = `pkg-config --cflags gtk4 webkit2gtk-5.0 x11`
|
CFLAGS = `pkg-config --cflags gtk4 webkit2gtk-5.0 x11`
|
||||||
LIBS = `pkg-config --libs gtk4 webkit2gtk-5.0 x11`
|
LIBS = `pkg-config --libs gtk4 webkit2gtk-5.0 x11`
|
||||||
OPTIONS = -Dgtk_doc=false -Dintrospection=false \
|
OPTIONS = -Dgtk_doc=false -Dintrospection=false \
|
||||||
|
@ -16,7 +17,7 @@ OPTIONS = -Dgtk_doc=false -Dintrospection=false \
|
||||||
-Db_coverage=false \
|
-Db_coverage=false \
|
||||||
-Ddebug=false
|
-Ddebug=false
|
||||||
|
|
||||||
PREFIX=/usr/local
|
PREFIX ?= /usr/local
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(CC) -fPIC -O3 -o rose *.c $(CFLAGS) $(LIBS) $(OPTIONS)
|
$(CC) -fPIC -O3 -o rose *.c $(CFLAGS) $(LIBS) $(OPTIONS)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user