FLAGS = -g -Wall -Wextra -DLOG_USE_COLOR `pkg-config --cflags --libs libnotify` LD_FLAGS = -lsqlite3 -lpthread $(shell mkdir -p out) all: takl takl-daemon out/%.o: src/%.c $(CC) -c $(FLAGS) $^ -o $@ out/%.o: src/main/%.c $(CC) -c $(FLAGS) $^ -o $@ out/%.o: src/log/%.c $(CC) -c $(FLAGS) $^ -o $@ takl: out/main.o out/db.o out/tasks.o out/utils.o $(CC) $(FLAGS) $(LD_FLAGS) $^ -o $@ takl-daemon: out/daemon.o out/db.o out/tasks.o out/utils.o out/log.o $(CC) $(FLAGS) $(LD_FLAGS) $^ -o $@ install: takl takl-daemon sudo cp takl takl-daemon /usr/bin/ uninstall: -sudo rm /usr/bin/takl -sudo rm /usr/bin/takl-daemon -sudo rm ~/.config/autostart/takl-daemon.desktop gnome-install: install mkdir -p ~/.config/autostart cp takl-daemon.desktop ~/.config/autostart/ clean: -rm out -r -rm ./takl -rm ./takl-daemon