# SPDX-License-Identifier: GPL-3.0-or-later
# pomelo-notify — Pomelo 通知服務
PREFIX ?= /usr/local
CFLAGS ?= -Os -pipe -Wall -Wextra -Wno-unused-parameter -Wno-format-truncation
POMELO_CFLAGS ?= $(shell pkg-config --cflags pomelo)
POMELO_LIBS   ?= $(shell pkg-config --libs pomelo)

pomelo-notify: pomelo-notify.c
	$(CC) $(CFLAGS) $(POMELO_CFLAGS) $$(pkg-config --cflags dbus-1) -o $@ pomelo-notify.c $(POMELO_LIBS) $$(pkg-config --libs dbus-1) -lm $(LDFLAGS)

install: pomelo-notify
	install -Dm755 pomelo-notify $(DESTDIR)$(PREFIX)/bin/pomelo-notify

clean:
	rm -f pomelo-notify

.PHONY: install clean
