Makefile.am
author Sam Lantinga <slouken@libsdl.org>
Fri, 30 Dec 2011 16:14:00 -0500
changeset 279 e2fa9ff13b5d
parent 278 2fd74c55f313
child 280 ec4ae96c100c
permissions -rw-r--r--
SDL_image uses ImageIO for ios4 and osx and UIImage on ios3

Vittorio Giovara

>> The second one is a feature request to make it so that when the
>> ImageIO framework is not present the library would fallback to the
>> UIImage backend; although it would perhaps make backporting a little
>> difficult I am sure that there is still a lot of software targeting
>> pre-ios 4 that could make use of it.
>
> It's possible, and not entirely unreasonable, but iOS moves so fast
> that I haven't felt it really merited the extra effort to do so. My
> experience is that there isn't a lot of interest in 3.x. I have a
> 3.1.3 device and there are actually very few apps (that I would be
> interested in getting) that support 3.x any more and I have to be very
> careful to no upgrade my existing apps because the new versions don't
> work on my device any more. I think the percentage of devices 3.x is
> less than 10% now. Testing old devices is another difficulty. And if
> you need to start weak linking frameworks in the Xcode project, you go
> into areas most non Apple developers don't know about.
>
> -Eric

I see your point, iOS is a much faster platform than OSX and a lot of
applications are dropping support for 3.* devices, however I feel that
as SDL is a compatibility layer between architectures it should be as
compatible as possible, until major api change or build system make it
impossible/unbearable to keep it updated.
Having said that I am proposing a solution that should keep SDL_image
compatible with both the newer ImageIO for ios4 and osx and allow us
to use uiimage on ios3: what I am linking is a merge of
IMG_UIImage.m and IMG_ImageIO.c and the small changes that need to be
applied to the related xcode project files).
slouken@0
     1
# Makefile.am for the SDL sample image loading library and viewer
slouken@0
     2
slouken@0
     3
lib_LTLIBRARIES = libSDL_image.la
slouken@0
     4
slouken@0
     5
libSDL_imageincludedir = $(includedir)/SDL
slouken@0
     6
libSDL_imageinclude_HEADERS =	\
slouken@0
     7
	SDL_image.h
slouken@0
     8
slouken@0
     9
libSDL_image_la_SOURCES =		\
slouken@0
    10
	IMG.c			\
slouken@0
    11
	IMG_bmp.c		\
slouken@0
    12
	IMG_gif.c		\
slouken@0
    13
	IMG_jpg.c		\
slouken@45
    14
	IMG_lbm.c		\
slouken@0
    15
	IMG_pcx.c		\
slouken@0
    16
	IMG_png.c		\
slouken@25
    17
	IMG_pnm.c		\
slouken@0
    18
	IMG_tga.c		\
slouken@7
    19
	IMG_tif.c		\
slouken@26
    20
	IMG_xcf.c		\
slouken@119
    21
	IMG_xpm.c		\
slouken@237
    22
	IMG_xv.c		\
slouken@278
    23
	IMG_webp.c	\
slouken@279
    24
	IMG_ImageIO.m
slouken@0
    25
slouken@0
    26
EXTRA_DIST =			\
slouken@259
    27
	Android.mk		\
slouken@0
    28
	CHANGES			\
slouken@164
    29
	version.rc		\
slouken@269
    30
	VisualC			\
slouken@212
    31
	VisualCE.zip		\
slouken@107
    32
	Xcode.tar.gz		\
slouken@224
    33
	Xcode_iPhone.tar.gz	\
slouken@30
    34
	MPWmake.sea.bin		\
slouken@136
    35
	Watcom-OS2.zip		\
slouken@0
    36
	IMG_xxx.c		\
slouken@223
    37
	IMG_UIImage.m		\
slouken@37
    38
	SDL_image.spec		\
slouken@131
    39
	gcc-fat.sh		\
slouken@0
    40
	autogen.sh
slouken@0
    41
slouken@164
    42
if USE_VERSION_RC
slouken@164
    43
libSDL_image_la_LDFLAGS = 	\
slouken@164
    44
	-no-undefined		\
slouken@164
    45
	-release $(LT_RELEASE)	\
slouken@164
    46
	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -Wl,version.o
slouken@164
    47
libSDL_image_la_LIBADD = $(IMG_LIBS)
slouken@164
    48
libSDL_image_la_DEPENDENCIES = version.o
slouken@164
    49
else
slouken@94
    50
libSDL_image_la_LDFLAGS = 	\
slouken@94
    51
	-no-undefined		\
slouken@37
    52
	-release $(LT_RELEASE)	\
slouken@0
    53
	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
slouken@137
    54
libSDL_image_la_LIBADD = $(IMG_LIBS)
slouken@164
    55
endif
slouken@164
    56
slouken@196
    57
pkgconfigdir = $(libdir)/pkgconfig
slouken@196
    58
pkgconfig_DATA = SDL_image.pc
slouken@196
    59
slouken@164
    60
%.o : %.rc
slouken@164
    61
	$(WINDRES) $< $@
slouken@0
    62
slouken@77
    63
noinst_PROGRAMS = showimage
slouken@0
    64
slouken@0
    65
showimage_LDADD = libSDL_image.la
slouken@0
    66
slouken@0
    67
# Rule to build tar-gzipped distribution package
slouken@37
    68
$(PACKAGE)-$(VERSION).tar.gz: distcheck
slouken@0
    69
slouken@0
    70
# Rule to build RPM distribution package
slouken@0
    71
rpm: $(PACKAGE)-$(VERSION).tar.gz
slouken@178
    72
	rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz
slouken@0
    73