added sdl_gles_get/setattribute calls
[sdlhildon] / sdlgles / src / Makefile
1 PREFIX:=$(shell sdl-config --prefix)
2 CFLAGS:=-g -O0 -Wall -Wextra
3
4 CC:=gcc
5
6 RELEASE:=1.2
7 VERSION:=0:1:0
8
9 SDL_GLES_TARGET:=libSDL_gles.la
10
11 SDL_GLES_LDLIBS:=$(shell sdl-config --libs) -lEGL
12 SDL_GLES_CFLAGS:=$(shell sdl-config --cflags)
13 SDL_GLES_LDFLAGS:=-release $(RELEASE) -version-info $(VERSION) -rpath $(PREFIX)/lib
14
15 all: $(SDL_GLES_TARGET)
16
17 $(SDL_GLES_TARGET): SDL_gles.lo
18         $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(SDL_GLES_LDFLAGS) $(LDLIBS) $(SDL_GLES_LDLIBS) -o $@ $^
19         
20 SDL_gles.lo: SDL_gles.c
21         $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(SDL_GLES_CFLAGS) -c $^
22         
23 clean:
24         $(LIBTOOL) --mode=clean rm -f *.o *.lo $(SDL_GLES_TARGET)
25         
26 install: $(SDL_GLES_TARGET)
27         install -d $(DESTDIR)$(PREFIX)/include/SDL $(DESTDIR)$(PREFIX)/lib
28         install SDL_gles.h $(DESTDIR)$(PREFIX)/include/SDL/
29         $(LIBTOOL) --mode=install install -c $(SDL_GLES_TARGET) $(DESTDIR)$(PREFIX)/lib/
30 ifeq ($(DESTDIR),)
31         $(LIBTOOL) --mode=finish $(PREFIX)/lib
32 endif
33
34 uninstall:
35         -$(LIBTOOL) --mode=uninstall rm $(DESTDIR)$(PREFIX)/lib/$(SDL_GLES_TARGET)
36         -rm $(DESTDIR)$(PREFIX)/include/SDL/SDL_gles.h
37