2023-10-27 11:19:53 +02:00
|
|
|
FLAGS = -g -Wall -Wextra -DLOG_USE_COLOR
|
|
|
|
LD_FLAGS = -lsqlite3 -lpthread
|
|
|
|
NOTIF_FLAGS = `pkg-config --cflags --libs libnotify`
|
2023-07-12 11:08:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
$(shell mkdir -p out)
|
|
|
|
|
|
|
|
|
2023-07-16 10:19:36 +02:00
|
|
|
all: takl takl-daemon
|
|
|
|
|
|
|
|
|
2023-07-12 11:08:40 +02:00
|
|
|
out/%.o: src/%.c
|
|
|
|
$(CC) -c $(FLAGS) $^ -o $@
|
|
|
|
|
2023-10-27 11:19:53 +02:00
|
|
|
out/notification.o: src/main/notification.c
|
|
|
|
$(CC) -c $(FLAGS) $(NOTIF_FLAGS) $^ -o $@
|
|
|
|
|
2023-07-16 10:19:36 +02:00
|
|
|
out/%.o: src/main/%.c
|
|
|
|
$(CC) -c $(FLAGS) $^ -o $@
|
|
|
|
|
|
|
|
out/%.o: src/log/%.c
|
|
|
|
$(CC) -c $(FLAGS) $^ -o $@
|
|
|
|
|
2023-07-16 13:04:37 +02:00
|
|
|
takl: out/main.o out/db.o out/tasks.o out/utils.o
|
2023-07-13 12:00:05 +02:00
|
|
|
$(CC) $(FLAGS) $(LD_FLAGS) $^ -o $@
|
|
|
|
|
2023-10-27 11:19:53 +02:00
|
|
|
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 $@
|
2023-07-16 10:19:36 +02:00
|
|
|
|
2023-07-12 11:08:40 +02:00
|
|
|
|
2023-07-16 16:01:38 +02:00
|
|
|
install: takl takl-daemon
|
|
|
|
sudo cp takl takl-daemon /usr/bin/
|
2023-07-12 22:55:38 +02:00
|
|
|
|
2023-07-16 16:01:38 +02:00
|
|
|
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/
|
2023-07-12 22:55:38 +02:00
|
|
|
|
2023-07-13 12:00:05 +02:00
|
|
|
|
2023-07-12 11:08:40 +02:00
|
|
|
clean:
|
2023-07-16 16:01:38 +02:00
|
|
|
-rm out -r
|
|
|
|
-rm ./takl
|
|
|
|
-rm ./takl-daemon
|