TaKl/Makefile

47 lines
978 B
Makefile

FLAGS = -g -Wall -Wextra -DLOG_USE_COLOR
LD_FLAGS = -lsqlite3 -lpthread
NOTIF_FLAGS = `pkg-config --cflags --libs libnotify`
$(shell mkdir -p out)
all: takl takl-daemon
out/%.o: src/%.c
$(CC) -c $(FLAGS) $^ -o $@
out/notification.o: src/main/notification.c
$(CC) -c $(FLAGS) $(NOTIF_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 out/notification.o
$(CC) $(FLAGS) $(LD_FLAGS) $(NOTIF_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