Respect user's pkg-config, don't call gcc directly, respect CFLAGS --- a/Makefile +++ b/Makefile @@ -8,14 +8,14 @@ LFLAGS += $(LDFLAGS) ## Support for GKrellM 2.0 # -GTK2_INCLUDE = `pkg-config gtk+-2.0 --cflags` -GTK2_LIB = `pkg-config gtk+-2.0 --libs` +PKG_CONFIG ?= pkg-config +GTK2_INCLUDE = $(shell ${PKG_CONFIG} gtk+-2.0 --cflags) +GTK2_LIB = $(shell ${PKG_CONFIG} gtk+-2.0 --libs) SINSTALLDIR2 = /usr/share/gkrellm2/plugins UINSTALLDIR2 = $(HOME)/.gkrellm2/plugins -FLAGS2 = -O2 -Wall -fPIC -I. $(GTK2_INCLUDE) +FLAGS2 = -fPIC -I. $(GTK2_INCLUDE) LIBS2 = $(GTK2_LIB) -CC2 = gcc $(FLAGS2) -DGKRELLM2 -CC2F = gcc $(FLAGS2) -DFAKE -DGKRELLM2 +CC = $(CC) OBJS2 = i8krellm.o # seems to barf without the @echo.... @@ -23,14 +23,14 @@ i8krellm: i8krellm.so @echo "" i8krellm.so: $(OBJS2) - $(CC2) $(OBJS2) -o i8krellm.so $(LFLAGS) $(LIBS2) + $(CC) $(CFLAGS) $(CFLAGS) $(FLAGS2) -DGKRELLM2 $(OBJS2) -o i8krellm.so $(LFLAGS) $(LIBS2) fake: i8krellm.c prop-anim.xpm - $(CC2F) -c -o i8krellm.o i8krellm.c - $(CC2F) $(OBJS2) -o i8krellm.so $(LFLAGS) $(LIBS2) + $(CC) $(CFLAGS) $(FLAGS2) -DFAKE -DGKRELLM2 -c -o i8krellm.o i8krellm.c + $(CC) $(CFLAGS) $(FLAGS2) -DFAKE -DGKRELLM2 $(OBJS2) -o i8krellm.so $(LFLAGS) $(LIBS2) i8krellm.o: i8krellm.c prop-anim.xpm - $(CC2) -c -o i8krellm.o i8krellm.c + $(CC) $(CFLAGS) $(FLAGS2) -DGKRELLM2 -c -o i8krellm.o i8krellm.c site_install: i8krellm.so install -c -s -m 644 i8krellm.so $(SINSTALLDIR2)