TaKl/Makefile

47 lines
978 B
Makefile
Raw Normal View History

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)
all: takl takl-daemon
2023-07-12 11:08:40 +02:00
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 $@
2023-07-16 13:04:37 +02:00
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 $@
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-12 11:08:40 +02:00
clean:
2023-07-16 16:01:38 +02:00
-rm out -r
-rm ./takl
-rm ./takl-daemon