SOURCES = adding_and_deleting.c auxiliary.c check_for_external_changes_timeout.c context_menu.c drag_and_drop.c \
          editing.c find.c find_and_replace.c kickshaw.c load_menu.c save_menu.c selecting.c undo_redo_autosave.c \
          .gresource.c
OBJS    = ${SOURCES:.c=.o}
CFLAGS  = -O2 -pedantic -std=gnu11 -Wall -Wextra -Wmissing-prototypes `pkg-config gtk+-3.0 --cflags`
LDADD   = `pkg-config gtk+-3.0 --libs`
CC      = gcc
PACKAGE = kickshaw
PREFIX 	= /usr/local

all: ${OBJS}
	${CC} -o ${PACKAGE} ${OBJS} ${LDADD}

.c.o:
	${CC} ${CFLAGS} -c $<

clean:
	rm -f .*resource*.o *.o *.bak *~ kickshaw

install:
	mkdir -p /usr/share/locale
	cp -R resources/txts/translations/af /usr/share/locale/
	cp -R resources/txts/translations/am /usr/share/locale/
	cp -R resources/txts/translations/ar /usr/share/locale/
	cp -R resources/txts/translations/as /usr/share/locale/
	cp -R resources/txts/translations/az /usr/share/locale/
	cp -R resources/txts/translations/be /usr/share/locale/
	cp -R resources/txts/translations/bg /usr/share/locale/
	cp -R resources/txts/translations/bho /usr/share/locale/
	cp -R resources/txts/translations/bn /usr/share/locale/
	cp -R resources/txts/translations/bo /usr/share/locale/
	cp -R resources/txts/translations/br /usr/share/locale/
	cp -R resources/txts/translations/bs /usr/share/locale/
	cp -R resources/txts/translations/ca /usr/share/locale/
	cp -R resources/txts/translations/ceb /usr/share/locale/
	cp -R resources/txts/translations/cs /usr/share/locale/
	cp -R resources/txts/translations/cy /usr/share/locale/
	cp -R resources/txts/translations/da /usr/share/locale/
	cp -R resources/txts/translations/de_CH /usr/share/locale/
	cp -R resources/txts/translations/de_DE /usr/share/locale/
	cp -R resources/txts/translations/el /usr/share/locale/
	cp -R resources/txts/translations/en_GB /usr/share/locale/
	cp -R resources/txts/translations/eo /usr/share/locale/
	cp -R resources/txts/translations/es /usr/share/locale/
	cp -R resources/txts/translations/et /usr/share/locale/
	cp -R resources/txts/translations/eu /usr/share/locale/
	cp -R resources/txts/translations/fa /usr/share/locale/
	cp -R resources/txts/translations/ff /usr/share/locale/
	cp -R resources/txts/translations/fi /usr/share/locale/
	cp -R resources/txts/translations/fil /usr/share/locale/
	cp -R resources/txts/translations/fo /usr/share/locale/
	cp -R resources/txts/translations/fr /usr/share/locale/
	cp -R resources/txts/translations/fur /usr/share/locale/
	cp -R resources/txts/translations/fy /usr/share/locale/
	cp -R resources/txts/translations/ga /usr/share/locale/
	cp -R resources/txts/translations/gd /usr/share/locale/
	cp -R resources/txts/translations/gl /usr/share/locale/
	cp -R resources/txts/translations/gu /usr/share/locale/
	cp -R resources/txts/translations/ha /usr/share/locale/
	cp -R resources/txts/translations/he /usr/share/locale/
	cp -R resources/txts/translations/hi /usr/share/locale/
	cp -R resources/txts/translations/hr /usr/share/locale/
	cp -R resources/txts/translations/ht /usr/share/locale/
	cp -R resources/txts/translations/hu /usr/share/locale/
	cp -R resources/txts/translations/hy /usr/share/locale/
	cp -R resources/txts/translations/id /usr/share/locale/
	cp -R resources/txts/translations/ig /usr/share/locale/
	cp -R resources/txts/translations/is /usr/share/locale/
	cp -R resources/txts/translations/it /usr/share/locale/
	cp -R resources/txts/translations/ja /usr/share/locale/
	cp -R resources/txts/translations/ka /usr/share/locale/
	cp -R resources/txts/translations/kk /usr/share/locale/
	cp -R resources/txts/translations/kl /usr/share/locale/
	cp -R resources/txts/translations/km /usr/share/locale/
	cp -R resources/txts/translations/kn /usr/share/locale/
	cp -R resources/txts/translations/ko /usr/share/locale/
	cp -R resources/txts/translations/kok /usr/share/locale/
	cp -R resources/txts/translations/ks /usr/share/locale/
	cp -R resources/txts/translations/ku_TR /usr/share/locale/
	cp -R resources/txts/translations/ky /usr/share/locale/
	cp -R resources/txts/translations/lb /usr/share/locale/
	cp -R resources/txts/translations/lo /usr/share/locale/
	cp -R resources/txts/translations/lt /usr/share/locale/
	cp -R resources/txts/translations/lv /usr/share/locale/
	cp -R resources/txts/translations/mai /usr/share/locale/
	cp -R resources/txts/translations/mg /usr/share/locale/
	cp -R resources/txts/translations/mi /usr/share/locale/
	cp -R resources/txts/translations/mk /usr/share/locale/
	cp -R resources/txts/translations/ml /usr/share/locale/
	cp -R resources/txts/translations/mn /usr/share/locale/
	cp -R resources/txts/translations/mr /usr/share/locale/
	cp -R resources/txts/translations/ms /usr/share/locale/
	cp -R resources/txts/translations/mt /usr/share/locale/
	cp -R resources/txts/translations/my /usr/share/locale/
	cp -R resources/txts/translations/nb /usr/share/locale/
	cp -R resources/txts/translations/ne /usr/share/locale/
	cp -R resources/txts/translations/nl /usr/share/locale/
	cp -R resources/txts/translations/nn /usr/share/locale/
	cp -R resources/txts/translations/nso /usr/share/locale/
	cp -R resources/txts/translations/om /usr/share/locale/
	cp -R resources/txts/translations/or /usr/share/locale/
	cp -R resources/txts/translations/pa_IN /usr/share/locale/
	cp -R resources/txts/translations/pl /usr/share/locale/
	cp -R resources/txts/translations/ps /usr/share/locale/
	cp -R resources/txts/translations/pt_BR /usr/share/locale/
	cp -R resources/txts/translations/pt_PT /usr/share/locale/
	cp -R resources/txts/translations/ro /usr/share/locale/
	cp -R resources/txts/translations/ru /usr/share/locale/
	cp -R resources/txts/translations/rw /usr/share/locale/
	cp -R resources/txts/translations/sc /usr/share/locale/
	cp -R resources/txts/translations/sd /usr/share/locale/
	cp -R resources/txts/translations/si /usr/share/locale/
	cp -R resources/txts/translations/sk /usr/share/locale/
	cp -R resources/txts/translations/sl /usr/share/locale/
	cp -R resources/txts/translations/sq /usr/share/locale/
	cp -R resources/txts/translations/sr /usr/share/locale/
	cp -R resources/txts/translations/sv /usr/share/locale/
	cp -R resources/txts/translations/sw /usr/share/locale/
	cp -R resources/txts/translations/ta /usr/share/locale/
	cp -R resources/txts/translations/te /usr/share/locale/
	cp -R resources/txts/translations/tg /usr/share/locale/
	cp -R resources/txts/translations/th /usr/share/locale/
	cp -R resources/txts/translations/ti /usr/share/locale/
	cp -R resources/txts/translations/tk /usr/share/locale/
	cp -R resources/txts/translations/tn /usr/share/locale/
	cp -R resources/txts/translations/tr /usr/share/locale/
	cp -R resources/txts/translations/tt /usr/share/locale/
	cp -R resources/txts/translations/ug /usr/share/locale/
	cp -R resources/txts/translations/uk /usr/share/locale/
	cp -R resources/txts/translations/ur /usr/share/locale/
	cp -R resources/txts/translations/uz /usr/share/locale/
	cp -R resources/txts/translations/vi /usr/share/locale/
	cp -R resources/txts/translations/wo /usr/share/locale/
	cp -R resources/txts/translations/xh /usr/share/locale/
	cp -R resources/txts/translations/yo /usr/share/locale/
	cp -R resources/txts/translations/zh_CN /usr/share/locale/
	cp -R resources/txts/translations/zh_HK /usr/share/locale/
	cp -R resources/txts/translations/zh_TW /usr/share/locale/
	cp -R resources/txts/translations/zu /usr/share/locale/
	cp kickshaw $(PREFIX)/bin

uninstall:
	rm $(PREFIX)/bin/kickshaw
	rm /usr/share/locale/af/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/am/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ar/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/as/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/az/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/be/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/bg/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/bho/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/bn/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/bo/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/br/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/bs/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ca/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ceb/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/cs/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/cy/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/da/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/de_CH/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/de_DE/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/el/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/en_GB/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/eo/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/es/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/et/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/eu/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/fa/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ff/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/fi/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/fil/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/fo/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/fr/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/fur/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/fy/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ga/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/gd/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/gl/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/gu/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ha/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/he/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/hi/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/hr/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ht/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/hu/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/hy/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/id/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ig/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/is/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/it/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ja/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ka/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/kk/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/kl/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/km/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/kn/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ko/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/kok/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ks/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ku_TR/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ky/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/lb/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/lo/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/lt/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/lv/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/mai/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/mg/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/mi/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/mk/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ml/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/mn/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/mr/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ms/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/mt/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/my/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/nb/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ne/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/nl/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/nn/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/nso/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/om/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/or/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/pa_IN/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/pl/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ps/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/pt_BR/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/pt_PT/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ro/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ru/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/rw/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/sc/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/sd/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/si/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/sk/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/sl/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/sq/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/sr/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/sv/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/sw/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ta/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/te/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/tg/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/th/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ti/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/tk/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/tn/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/tr/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/tt/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ug/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/uk/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/ur/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/uz/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/vi/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/wo/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/xh/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/yo/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/zh_CN/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/zh_HK/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/zh_TW/LC_MESSAGES/kickshaw.mo
	rm /usr/share/locale/zu/LC_MESSAGES/kickshaw.mo
	@echo "For every user who has started Kickshaw a settings file .kickshawrc was created inside the respective home directory. It is not removed automatically, so it has to be removed manually."
