wrlib: Use a Conditional for GIF in the makefile instead of #if in source
[wmaker-crm.git] / wrlib / Makefile.am
blobdc379a1282f8a5fc9d77df75353ebd9c713a0b48
1 ## automake input file for wrlib
3 SUBDIRS = .
5 AUTOMAKE_OPTIONS =
7 EXTRA_DIST = tests libwraster.map get-wraster-flags.in
9 lib_LTLIBRARIES = libwraster.la
11 libwraster_la_LDFLAGS = -version-info @WRASTER_VERSION@
13 if HAVE_LD_VERSION_SCRIPT
14 libwraster_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libwraster.map
15 endif
17 bin_SCRIPTS = get-wraster-flags
19 include_HEADERS = wraster.h
21 libwraster_la_SOURCES =         \
22         imgformat.h     \
23         raster.c        \
24         alpha_combine.c \
25         draw.c          \
26         color.c         \
27         load.c          \
28         save.c          \
29         gradient.c      \
30         xpixmap.c       \
31         convert.c       \
32         context.c       \
33         misc.c          \
34         scale.c         \
35         rotate.c        \
36         convolve.c      \
37         nxpm.c          \
38         xpm.c           \
39         xutil.c         \
40         ppm.c           \
41         png.c           \
42         jpeg.c          \
43         tiff.c
45 if USE_GIF
46 libwraster_la_SOURCES += gif.c
47 endif
49 LTCOMPILE2=`echo $(LTCOMPILE) | sed -e s/-fomit-frame-pointer//`
50 COMPILE2=`echo $(COMPILE) | sed -e s/-fomit-frame-pointer//`
52 AM_CPPFLAGS = $(DFLAGS) @HEADER_SEARCH_PATH@
54 libwraster_la_LIBADD = @LIBRARY_SEARCH_PATH@ @GFXLIBS@ @XLIBS@ @LIBXMU@ -lm
56 pkgconfigdir = $(libdir)/pkgconfig
57 pkgconfig_DATA = wrlib.pc
59 DISTCLEANFILES = $(pkgconfig_DATA) get-wraster-flags
61 wrlib.pc: Makefile
62         @echo "Generating $@"
63         @echo 'Name: wrlib' > $@
64         @echo 'Description: Image manipulation and conversion library' >> $@
65         @echo 'Version: $(VERSION)' >> $@
66         @echo 'Libs: $(lib_search_path) -lwraster' >> $@
67         @echo 'Libs.private: $(GFXLIBS) $(XLIBS) -lm' >> $@
68         @echo 'Cflags: $(inc_search_path)' >> $@
70 get-wraster-flags: get-wraster-flags.in Makefile
71         @echo "Generating $@"
72         @$(SED) -e 's#$${inc_search_path}#$(inc_search_path)#;' \
73                 -e 's#$${lib_search_path}#$(lib_search_path)#;' \
74                 -e 's#$${GFXLIBS}#$(GFXLIBS)#;' \
75                 -e 's#$${XLIBS}#$(XLIBS)#;' < $(abs_srcdir)/get-wraster-flags.in > $@
76         @chmod 755 $@