## Created by Anjuta

PROGRAM = $(shell pwd | sed -e 's/[[:space:]]\+//g' | awk -F '/' '{print $$NF}')
CC = g++
CFLAGS = -g -Wall
OBJECTS = $(patsubst %.cc,%.o,$(wildcard *.cc))
INCFLAGS = `pkg-config --cflags gtkmm-2.4` -I./
LDFLAGS = -Wl,-rpath,/usr/local/lib
LIBS = `pkg-config --libs gtkmm-2.4`

all: $(PROGRAM)
ifndef NORUN
	./$(PROGRAM)
endif

$(PROGRAM): $(OBJECTS)
	$(CC) -o $(PROGRAM) $(OBJECTS) $(LDFLAGS) $(LIBS)

.SUFFIXES:	.c .cc .C .cpp .o

%.o : %.cc
	$(CC) -o $@ -c $(CFLAGS) $< $(INCFLAGS)

count:
	wc *.c *.cc *.C *.cpp *.h *.hpp

clean:
	rm -f *.o $(PROGRAM)

.PHONY: all
.PHONY: count
.PHONY: clean
