1# Example for use of GNU gettext. 2# This file is in the public domain. 3# 4# Makefile configuration - processed by automake. 5 6# General automake options. 7AUTOMAKE_OPTIONS = foreign no-dependencies 8ACLOCAL_AMFLAGS = -I m4 9 10# The list of subdirectories containing Makefiles. 11SUBDIRS = m4 po 12 13# The list of programs that are built. 14bin_PROGRAMS = hello 15 16# The source files of the 'hello' program. 17hello_SOURCES = hello.c resources.c 18 19# Define a C macro LOCALEDIR indicating where catalogs will be installed. 20DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ 21 22# Make sure the gnome.h include file is found. 23AM_CPPFLAGS = $(GTK_CFLAGS) 24 25# Link time dependencies. 26LDADD = $(GTK_LIBS) @LIBINTL@ 27 28BUILT_SOURCES = gschemas.compiled resources.c 29 30# Compile GSettings schema. 31gschemas.compiled: hello.gschema.xml 32 $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) . 33 34# Compile assets into a C source and link it with the application. 35resources.c: hello.gresource.xml hello.ui 36 $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< --target=$@ \ 37 --sourcedir=$(srcdir) --generate-source 38 39desktopdir = $(datadir)/applications 40desktop_DATA = hello.desktop 41 42# Merge translations back into a Desktop Entry file. 43 44# Note that the resulting file should be included in EXTRA_DIST and 45# processed earlier than the variable substitution below. Otherwise, 46# the 'msgfmt' command will be required at compile-time. 47hello.desktop.in: hello.desktop.in.in 48 $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@ 49 50# Substitute variables in a Desktop Entry file. 51hello.desktop: hello.desktop.in 52 $(AM_V_GEN) sed -e 's|@bindir[@]|$(bindir)|g' $< > $@ 53 54CLEANFILES = $(BUILT_SOURCES) hello.desktop $(desktop_DATA) 55 56# Additional files to be distributed. 57EXTRA_DIST = autogen.sh autoclean.sh hello.ui \ 58 hello.desktop.in.in hello.desktop.in \ 59 hello.gschema.xml \ 60 hello.gresource.xml 61 62MAINTAINERCLEANFILES = hello.desktop.in 63