WRaster: Fix incorrect use of macro USE_XSHM in installed header
[wmaker-crm.git] / wrlib / Makefile.am
blob37c8e37af3d71164ab32d91f3b0f63043dc4aa38
1 ## automake input file for wrlib
3 SUBDIRS = . po
4 DIST_SUBDIRS = $(SUBDIRS) tests
6 AUTOMAKE_OPTIONS =
8 EXTRA_DIST = tests
10 lib_LTLIBRARIES = libwraster.la
12 libwraster_la_LDFLAGS = -version-info @WRASTER_VERSION@
14 CLEANFILES = wraster.h
15 EXTRA_DIST += wraster.h.in
17 if HAVE_LD_VERSION_SCRIPT
18 libwraster_la_LDFLAGS += -Wl,--version-script=libwraster.map
19 EXTRA_libwraster_la_DEPENDENCIES = libwraster.map
20 CLEANFILES += libwraster.map
21 endif
23 BUILT_SOURCES = wraster.h
24 nodist_include_HEADERS = wraster.h
26 libwraster_la_SOURCES =         \
27         imgformat.h     \
28         raster.c        \
29         alpha_combine.c \
30         draw.c          \
31         color.c         \
32         load.c          \
33         save.c          \
34         gradient.c      \
35         xpixmap.c       \
36         convert.h       \
37         convert.c       \
38         context.c       \
39         misc.c          \
40         scale.c         \
41         scale.h         \
42         rotate.c        \
43         rotate.h        \
44         flip.c          \
45         convolve.c      \
46         save_xpm.c      \
47         wr_i18n.h       \
48         xutil.c         \
49         xutil.h         \
50         load_ppm.c
52 if USE_GIF
53 libwraster_la_SOURCES += load_gif.c
54 endif
56 if USE_JPEG
57 libwraster_la_SOURCES += load_jpeg.c
58 endif
60 if USE_PNG
61 libwraster_la_SOURCES += load_png.c
62 endif
64 if USE_TIFF
65 libwraster_la_SOURCES += load_tiff.c
66 endif
68 if USE_XPM
69 libwraster_la_SOURCES += load_xpm.c
70 else
71 libwraster_la_SOURCES += load_xpm_normalized.c
72 endif
74 if USE_WEBP
75 libwraster_la_SOURCES += load_webp.c
76 endif
78 if USE_MAGICK
79 libwraster_la_SOURCES += load_magick.c
80 endif
82 AM_CFLAGS = @MAGICKFLAGS@
83 AM_CPPFLAGS = $(DFLAGS) @HEADER_SEARCH_PATH@
85 libwraster_la_LIBADD = @LIBRARY_SEARCH_PATH@ @GFXLIBS@ @MAGICKLIBS@ @XLIBS@ @LIBXMU@ -lm
87 pkgconfigdir = $(libdir)/pkgconfig
88 pkgconfig_DATA = wrlib.pc
90 DISTCLEANFILES = $(pkgconfig_DATA)
92 wrlib.pc: Makefile
93         @echo "Generating $@"
94         @echo 'Name: wrlib' > $@
95         @echo 'Description: Image manipulation and conversion library' >> $@
96         @echo 'Version: $(VERSION)' >> $@
97         @echo 'Libs: $(lib_search_path) -lwraster' >> $@
98         @echo 'Libs.private: $(GFXLIBS) $(MAGICKLIBS) $(XLIBS) -lm' >> $@
99         @echo 'Cflags: $(inc_search_path)' >> $@
101 wraster.h: wraster.h.in $(top_builddir)/config.h
102         $(AM_V_GEN)$(top_srcdir)/script/replace-ac-keywords.sh \
103                 --header "$(top_builddir)/config.h" \
104                 --filter "USE_XSHM" \
105                 -o $@  $<
108 if HAVE_LD_VERSION_SCRIPT
109 libwraster.map: $(nodist_include_HEADERS) $(top_srcdir)/script/generate-mapfile-from-header.sh
110         $(AM_V_GEN)$(top_srcdir)/script/generate-mapfile-from-header.sh \
111                 -n LIBWRASTER -v $(WRASTER_VERSION) $<  >  $@
112 endif