# SPDX-License-Identifier: GPL-3.0-or-later
#
# Makefile.am for GNUtrition
#
# Copyright (C) 2026 Free Software Foundation, Inc.
#
# Author: Jason Self <jself@gnu.org>
#         Anton McClure <asm@gnu.org>

bin_PROGRAMS = gnutrition
gnutrition_datadir = $(datadir)/gnutrition

gnutrition_data_DATA = food.db

doc_DATA = \
	AUTHORS \
	ChangeLog \
	ChangeLog.OLD \
	COPYING \
	gnutrition.html \
	gnutrition.pdf \
	INSTALL \
	NEWS \
	README

AM_CPPFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\"

# -----------------------------------------------------------------------------
# GTK GUI binary
# -----------------------------------------------------------------------------

gnutrition_SOURCES = \
	main.c \
	gui.c \
	dbus.c \
	db.c \
	budget.c \
	log.c

gnutrition_CFLAGS = -Wall -Wextra -pedantic $(SQLITE3_CFLAGS) $(GTK_CFLAGS) $(GIO_CFLAGS)
gnutrition_CPPFLAGS = -I$(srcdir) -DLOCALEDIR=\"$(localedir)\" -DGNUTRITION_DATADIR=\"$(gnutrition_datadir)\"
gnutrition_LDADD = $(SQLITE3_LIBS) $(GTK_LIBS) $(GIO_LIBS) -lm

# Include header files and support scripts in the distribution.
EXTRA_DIST = \
	budget.h \
	db.h \
	dbus.h \
	gui.h \
	i18n.h \
	log.h \
	version.sh \
	.ver \
	NEWS \
	ChangeLog \
	ChangeLog.OLD \
	gnutrition.html \
	gnutrition.pdf \
	gfdl.texi \
	food.db

MAINTAINERCLEANFILES = gnutrition.html gnutrition.pdf
