Makefile.am
author Sam Lantinga <slouken@libsdl.org>
Tue, 03 Jan 2012 22:14:17 -0500
changeset 294 66fc2d8ddfbc
parent 280 ec4ae96c100c
child 295 58fe012f40be
permissions -rw-r--r--
Fixed bug 1361 - Make error when building SDL_image from hg on Haiku - wants ObjectiveC compiler

Only include the Objective C source if we're building ImageIO
     1 # Makefile.am for the SDL sample image loading library and viewer
     2 
     3 lib_LTLIBRARIES = libSDL_image.la
     4 
     5 libSDL_imageincludedir = $(includedir)/SDL
     6 libSDL_imageinclude_HEADERS =	\
     7 	SDL_image.h
     8 
     9 if USE_IMAGEIO
    10 IMAGEIO_SOURCE = IMG_ImageIO.m
    11 endif
    12 
    13 libSDL_image_la_SOURCES =	\
    14 	IMG.c			\
    15 	IMG_bmp.c		\
    16 	IMG_gif.c		\
    17 	IMG_jpg.c		\
    18 	IMG_lbm.c		\
    19 	IMG_pcx.c		\
    20 	IMG_png.c		\
    21 	IMG_pnm.c		\
    22 	IMG_tga.c		\
    23 	IMG_tif.c		\
    24 	IMG_xcf.c		\
    25 	IMG_xpm.c		\
    26 	IMG_xv.c		\
    27 	IMG_webp.c		\
    28 	$(IMAGEIO_SOURCE)
    29 
    30 EXTRA_DIST =			\
    31 	Android.mk		\
    32 	CHANGES			\
    33 	version.rc		\
    34 	VisualC			\
    35 	VisualCE		\
    36 	Xcode			\
    37 	Xcode_iPhone		\
    38 	MPWmake.sea.bin		\
    39 	Watcom-OS2.zip		\
    40 	IMG_xxx.c		\
    41 	IMG_UIImage.m		\
    42 	SDL_image.spec		\
    43 	gcc-fat.sh		\
    44 	autogen.sh
    45 
    46 if USE_VERSION_RC
    47 libSDL_image_la_LDFLAGS = 	\
    48 	-no-undefined		\
    49 	-release $(LT_RELEASE)	\
    50 	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -Wl,version.o
    51 libSDL_image_la_LIBADD = $(IMG_LIBS)
    52 libSDL_image_la_DEPENDENCIES = version.o
    53 else
    54 libSDL_image_la_LDFLAGS = 	\
    55 	-no-undefined		\
    56 	-release $(LT_RELEASE)	\
    57 	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
    58 libSDL_image_la_LIBADD = $(IMG_LIBS)
    59 endif
    60 
    61 pkgconfigdir = $(libdir)/pkgconfig
    62 pkgconfig_DATA = SDL_image.pc
    63 
    64 %.o : %.rc
    65 	$(WINDRES) $< $@
    66 
    67 noinst_PROGRAMS = showimage
    68 
    69 showimage_LDADD = libSDL_image.la
    70 
    71 # Rule to build tar-gzipped distribution package
    72 $(PACKAGE)-$(VERSION).tar.gz: distcheck
    73 
    74 # Rule to build RPM distribution package
    75 rpm: $(PACKAGE)-$(VERSION).tar.gz
    76 	rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz
    77