prefix = /usr
bindir = $(prefix)/bin

CC ?= gcc
CFLAGS ?= -Wall -O2 -g
CFLAGS += $(GTK_CFLAGS)
LDLIBS += $(GTK_LIBS)

GTK_CFLAGS := $(shell pkg-config --cflags gtk+-2.0)
GTK_LIBS := $(shell pkg-config --libs gtk+-2.0)

all: screenshot-tool

clean:
	rm -f screenshot-tool

install: screenshot-tool
	install -m755 -d $(DESTDIR)$(bindir)
	install -m755 screenshot-tool $(DESTDIR)$(bindir)/

distclean: clean

.PHONY: all clean distclean install
