--- a/Makefile 2008-11-14 22:55:51.000000000 +0800 +++ b/Makefile 2008-11-14 23:00:51.000000000 +0800 @@ -1,7 +1,8 @@ DESTDIR = SBINDIR = /usr/sbin XCFLAGS = -W `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare -LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncursesw +LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncurses +CC ?= gcc # # The w in -lncursesw is not a typo; it is the wide-character version @@ -14,10 +15,10 @@ LDF = -Wl,--as-needed `pkg-config --libs # We write explicity this "implicit rule" %.o : %.c - gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@ + $(CC) -c $(CFLAGS) $(XCFLAGS) $< -o $@ latencytop: latencytop.o display.o latencytop.h translate.o Makefile - gcc $(CFLAGS) latencytop.o display.o translate.o $(LDF) -o latencytop + $(CC) $(CFLAGS) latencytop.o display.o translate.o $(LDF) -o latencytop clean: @@ -25,5 +26,6 @@ clean: install: latencytop mkdir -p $(DESTDIR)/usr/share/latencytop + mkdir -p $(DESTDIR)$(SBINDIR) install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/