CFLAGS		= -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes #-Wmissing-prototypes
PREFIX=blah

all: hutchr

hutchr: hutchr.c hutchr.h version.h
	gcc $(CFLAGS) -o hutchr hutchr.c

install:
ifeq ($(wildcard hutchr),)
	$(error hutchr not built yet, run make first)
endif

ifeq ($(PREFIX),)
	$(error prefix folder not set, run ./configure again)
else
	@mkdir -p $(PREFIX)/bin
	@cp hutchr $(PREFIX)/bin
endif 

clean:
	rm -f *.o
	rm -f hutchr
