-# Copyright © 2018, 2021 Nick Bowler
+# Copyright © 2018, 2021, 2023 Nick Bowler
#
# License WTFPL2: Do What The Fuck You Want To Public License, version 2.
# This is free software: you are free to do what the fuck you want to.
INSTALL README.md
AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib \
- -DLOCALEDIR=\"$(localedir)\"
+ -I$(DX_BASEDIR)/src -DLOCALEDIR=\"$(localedir)\"
AM_CFLAGS = $(LIBGERBV_CFLAGS) $(CNEARTREE_CFLAGS)
bin_PROGRAMS = slotifier
-slotifier_SOURCES = src/slotifier.c src/options.h
-slotifier_LDADD = $(LIBGERBV_LIBS) $(CNEARTREE_LIBS) libgnu.a \
- $(LTLIBICONV) $(LTLIBINTL) $(HYPOT_LIBM)
+noinst_HEADERS = common/src/help.h common/src/xtra.h
+slotifier_SOURCES = src/options.h common/src/help.c
+EXTRA_slotifier_DEPENDENCIES = $(libslotifiermain_a_OBJECTS)
+slotifier_LDADD = $(EXTRA_slotifier_DEPENDENCIES) \
+ $(LIBGERBV_LIBS) $(CNEARTREE_LIBS) libgnu.a \
+ $(LTLIBINTL) $(HYPOT_LIBM)
$(slotifier_OBJECTS): $(gnulib_headers)
-$(slotifier_OBJECTS): src/options.h
+
+if USE_NLS
+slotifier_SOURCES += common/src/copysym.c common/src/copysym.h
+endif
+
+EXTRA_LIBRARIES += libslotifiermain.a
+libslotifiermain_a_SOURCES = src/slotifier.c
+$(libslotifiermain_a_OBJECTS): $(gnulib_headers) src/options.h
dist_man_MANS = doc/slotifier.1
--add-comments=TRANSLATORS: --foreign-user \
--msgid-bugs-address=$(PACKAGE_BUGREPORT) \
--package-version=$(PACKAGE_VERSION) \
- --package-name=$(PACKAGE) --keyword=_
+ --package-name=$(PACKAGE) --keyword=_ \
+ --keyword=N_ --keyword=PN_:1c,2
po/$(PACKAGE).pot: $(SOURCES)
$(AM_V_at) $(MKDIR_P) $(@D)