gaf-config: Use new GFile config sys APIs where appropriate.
[geda-gaf/pcjc2.git] / gaf / Makefile.am
blob752c073aaee15e6a727d7bface2eb3fae83a5398
1 SUBDIRS = po
3 bin_PROGRAMS = gaf
5 EXTRA_DIST = $(html_man_files) gaf.1.in
7 BUILT_SOURCES = shell.x
9 gaf_SOURCES = \
10         builtins.h \
11         gettext.h \
12         gaf.c \
13         config.c \
14         export.c \
15         shell.c
17 gaf_CPPFLAGS = \
18         -I$(top_srcdir) -I$(top_srcdir)/libgeda/include -I$(includedir) \
19         -I$(top_srcdir)/intl
20 gaf_CFLAGS = \
21         $(GCC_CFLAGS) $(MINGW_CFLAGS) $(GUILE_CFLAGS) $(GTK_CFLAGS) \
22         $(GDK_PIXBUF_CFLAGS) $(CAIRO_CFLAGS) $(CAIRO_PNG_CFLAGS) \
23         $(CAIRO_PDF_CLAGS) $(CAIRO_PS_CFLAGS) $(CAIRO_SVG_CFLAGS)
24 gaf_LDFLAGS = $(GUILE_LIBS) $(GTK_LIBS) $(GDK_PIXBUF_LIBS) $(CAIRO_LIBS) \
25         $(CAIRO_PNG_LIBS) $(CAIRO_PDF_CLAGS) $(CAIRO_PS_LIBS) $(CAIRO_SVG_LIBS)
26 gaf_LDADD = \
27         $(top_builddir)/libgedacairo/libgedacairo.la \
28         $(top_builddir)/libgeda/src/libgeda.la \
29         @LIBINTL@
31 localedir = @datadir@/locale
32 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
34 # This is used to generate boilerplate for defining Scheme functions
35 # in C.
36 snarf_cpp_opts = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
37         $(gaf_CPPFLAGS) $(AM_CFLAGS) $(gaf_CFLAGS)
38 .c.x:
39         CPP="$(CPP)" $(GUILE_SNARF) -o $@ $< $(snarf_cpp_opts)
41 .1.in.1:
42         d=`LANG=C date -d $(DATE_VERSION) "+%B %-d, %Y"` ; \
43         v="$(DOTTED_VERSION).$(DATE_VERSION)" ; \
44         sed -e"s:[@]DATE@:$$d:" -e"s:[@]VERSION@:$$v:" < $< > $@
46 # Rules for converting man->html
47 dist_man_MANS = gaf.1
48 html_man_files = gaf.html
50 docsmandir=$(docdir)/man
51 docsman_DATA=$(html_man_files)
52 if ENABLE_GROFF_HTML
53 .1.html:
54         rm -rf $@.tmp && \
55         LC_NUMERIC=C $(GROFF) -man -T html  $< >$@.tmp && \
56         mv -f $@.tmp $@
57 else
58 .1.html:
59         @echo "No working groff available: cannot create $@"
60         @! :
61 endif
63 SUFFIXES = .x .1.in .1 .html
65 CLEANFILES = $(BUILT_SOURCES)