FLAGS = -g -Wall -Wextra -DLOG_USE_COLOR `pkg-config --cflags --libs libnotify` LD_FLAGS = -lsqlite3 $(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 $(CC) $(FLAGS) $(LD_FLAGS) $^ -o $@ takl-daemon: out/daemon.o out/db.o out/tasks.o out/log.o $(CC) $(FLAGS) $(LD_FLAGS) $^ -o $@ install: takl sudo cp takl /usr/bin/takl uninstall: takl sudo rm /usr/bin/takl clean: rm out -r rm ./takl rm ./takl-daemon