SUBDIRS = po

AUTOMAKE_OPTIONS =

pkgdatadir  = $(datadir)/@PACKAGE@

bin_PROGRAMS = wxcopy wxpaste wdwrite wdread getstyle setstyle convertfonts \
	seticons geticonset wmsetbg wmagnify wmgenmenu wmmenugen wmiv

bin_SCRIPTS = wmaker.inst wm-oldmenu2new wkdemenu.pl

EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new wkdemenu.pl

AM_CPPFLAGS = \
	 $(DFLAGS) -I$(top_srcdir)/WINGs -I$(top_builddir)/wrlib \
	@HEADER_SEARCH_PATH@ \
	-DETCDIR=\"sysconfdir\" -DDATADIR=\"pkgdatadir\"

liblist= @LIBRARY_SEARCH_PATH@ @INTLIBS@

wdwrite_LDFLAGS = \
	-L$(top_builddir)/wutil-rs/target/debug

wdwrite_LDADD = \
	$(top_builddir)/WINGs/libWUtil.la \
	-lwutil_rs \
	$(liblist)

wdread_LDFLAGS = \
	-L$(top_builddir)/wutil-rs/target/debug

wdread_LDADD = \
	$(top_builddir)/WINGs/libWUtil.la \
	-lwutil_rs \
	$(liblist)

wxcopy_LDFLAGS = \
	-L$(top_builddir)/wutil-rs/target/debug

wxcopy_LDADD = @XLFLAGS@ @XLIBS@ -lwutil_rs

wxpaste_LDADD = @XLFLAGS@ @XLIBS@

getstyle_LDFLAGS = \
	-L$(top_builddir)/wutil-rs/target/debug

getstyle_LDADD = \
	$(top_builddir)/WINGs/libWUtil.la \
	-lwutil_rs \
	$(liblist)

getstyle_SOURCES = getstyle.c fontconv.c common.h

setstyle_LDFLAGS = \
	-L$(top_builddir)/wutil-rs/target/debug

setstyle_LDADD = \
	$(top_builddir)/WINGs/libWUtil.la \
	-lwutil_rs \
	@XLFLAGS@ @XLIBS@ $(liblist)

setstyle_SOURCES = setstyle.c fontconv.c common.h

convertfonts_LDFLAGS = \
	-L$(top_builddir)/wutil-rs/target/debug

convertfonts_LDADD = \
	$(top_builddir)/WINGs/libWUtil.la \
	-lwutil_rs \
	$(liblist)

convertfonts_SOURCES = convertfonts.c fontconv.c common.h

seticons_LDFLAGS = \
	-L$(top_builddir)/wutil-rs/target/debug

seticons_LDADD= \
	$(top_builddir)/WINGs/libWUtil.la \
	-lwutil_rs \
	$(liblist)

geticonset_LDFLAGS = \
	-L$(top_builddir)/wutil-rs/target/debug

geticonset_LDADD= \
	$(top_builddir)/WINGs/libWUtil.la \
	-lwutil_rs \
	$(liblist)

wmagnify_LDFLAGS = \
	-L$(top_builddir)/WINGs/wings-rs/target/debug \
	-L$(top_builddir)/wutil-rs/target/debug

wmagnify_LDADD = \
	$(top_builddir)/WINGs/libWINGs.la \
	$(top_builddir)/WINGs/libWUtil.la \
	$(top_builddir)/wrlib/libwraster.la \
	-lwutil_rs \
	-lwings_rs \
	@XLFLAGS@ @XLIBS@ @INTLIBS@ @FCLIBS@ @PANGO_LIBS@

wmsetbg_LDFLAGS = \
	-L$(top_builddir)/wutil-rs/target/debug \
	-L$(top_builddir)/WINGs/wings-rs/target/debug

wmsetbg_LDADD = \
	$(top_builddir)/WINGs/libWINGs.la \
	$(top_builddir)/WINGs/libWUtil.la \
	$(top_builddir)/wrlib/libwraster.la \
	-lwings_rs \
	-lwutil_rs \
	$(top_builddir)/WINGs/libWINGs.la \
	@XLFLAGS@ @LIBXINERAMA@ @XLIBS@ @INTLIBS@ @FCLIBS@ @PANGO_LIBS@

wmgenmenu_LDFLAGS = \
	-L$(top_builddir)/wutil-rs/target/debug

wmgenmenu_LDADD = \
	$(top_builddir)/WINGs/libWUtil.la \
	-lwutil_rs \
	@INTLIBS@

wmgenmenu_SOURCES = wmgenmenu.c wmgenmenu.h

wmmenugen_LDFLAGS = \
	-L$(top_builddir)/wutil-rs/target/debug

wmmenugen_LDADD = \
	$(top_builddir)/WINGs/libWUtil.la \
	-lwutil_rs \
	@INTLIBS@

wmmenugen_SOURCES = wmmenugen.c wmmenugen.h wmmenugen_misc.c \
	wmmenugen_parse_wmconfig.c \
	wmmenugen_parse_xdg.c

wmiv_CFLAGS = @PANGO_CFLAGS@ @PTHREAD_CFLAGS@

wmiv_LDFLAGS = \
	-L$(top_builddir)/WINGs/wings-rs/target/debug \
	-L$(top_builddir)/wutil-rs/target/debug

wmiv_LDADD = \
	$(top_builddir)/wrlib/libwraster.la \
	$(top_builddir)/WINGs/libWUtil.la \
	$(top_builddir)/WINGs/libWINGs.la \
	-lwings_rs \
	-lwutil_rs \
	@XLFLAGS@ @XLIBS@ @GFXLIBS@ \
	@PANGO_LIBS@ @PTHREAD_LIBS@ @LIBEXIF@

wmiv_SOURCES = wmiv.c wmiv.h

CLEANFILES = wmaker.inst

wmaker.inst: $(srcdir)/wmaker.inst.in ./Makefile
	$(AM_V_GEN)sed -e "s|#pkgdatadir#|$(pkgdatadir)|" \
		-e "s|#sysconfdir#|$(sysconfdir)/WindowMaker|" \
		-e "s|#version#|$(VERSION)|" \
		-e "s|#bindir#|$(bindir)|" \
			$(srcdir)/wmaker.inst.in >wmaker.inst ; \
	chmod 755 wmaker.inst
