--- Makefile.orig 2003-06-11 13:16:36.000000000 +0800 +++ Makefile 2014-01-10 09:40:04.000000000 +0800 @@ -1,13 +1,13 @@ -GCC = cc -PREFIX=/usr/local -CFLAGS = -O2 -Wall $(shell pkg-config --cflags gtk+-2.0) -LIBS = $(shell pkg-config --libs gtk+-2.0) -CFLAGS += -DGTK_DISABLE_BROKEN -DGTK_DISABLE_DEPRECATED +GCC = ${CC} +PREFIX ?= /usr/local +CFLAGS += -Wall $(shell pkg-config --cflags gtk+-2.0) +LIBS += $(shell pkg-config --libs gtk+-2.0) +CFLAGS += -DGTK_DISABLE_BROKEN VERSION = 2.0.0rc2 -all: switch +all: switch2 -switch: switch.c switch.h +switch2: switch.c switch.h ${GCC} -o switch2 switch.c ${CFLAGS} ${LIBS} clean: @@ -15,10 +15,10 @@ clean: install: all strip switch2 - mkdir -p ${PREFIX}/bin - mkdir -p ${PREFIX}/man - install -c switch2 ${PREFIX}/bin - install -c switch.1 ${PREFIX}/man + mkdir -p $(DESTDIR)${PREFIX}/bin + mkdir -p $(DESTDIR)${PREFIX}/man + install -c -m 555 switch2 $(DESTDIR)${PREFIX}/bin + install -c -m 444 switch.1 $(DESTDIR)${PREFIX}/share/man/man1/switch2.1 dist: clean rm -rf /tmp/gtk-theme-switch-$(VERSION)