[SDL_Tizen] Do set_buffer_transform
[platform/upstream/SDL.git] / Makefile.in
1 # Makefile to build and install the SDL library
2
3 top_builddir = .
4 srcdir  = @srcdir@
5 objects = build
6 prefix = @prefix@
7 exec_prefix = @exec_prefix@
8 bindir  = @bindir@
9 libdir  = @libdir@
10 includedir = @includedir@
11 datarootdir = @datarootdir@
12 datadir = @datadir@
13 auxdir  = @ac_aux_dir@
14 distpath = $(srcdir)/..
15 distdir = SDL2-@SDL_VERSION@
16 distfile = $(distdir).tar.gz
17
18 @SET_MAKE@
19 SHELL   = @SHELL@
20 CC      = @CC@
21 INCLUDE = @INCLUDE@
22 CFLAGS  = @BUILD_CFLAGS@
23 EXTRA_CFLAGS = @EXTRA_CFLAGS@
24 LDFLAGS = @BUILD_LDFLAGS@
25 EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
26 LIBTOOL = @LIBTOOL@
27 INSTALL = @INSTALL@
28 AR      = @AR@
29 RANLIB  = @RANLIB@
30 WINDRES = @WINDRES@
31
32 TARGET  = libSDL2.la
33 OBJECTS = @OBJECTS@
34 VERSION_OBJECTS = @VERSION_OBJECTS@
35
36 SDLMAIN_TARGET = libSDL2main.a
37 SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
38
39 SDLTEST_TARGET = libSDL2_test.a
40 SDLTEST_OBJECTS = @SDLTEST_OBJECTS@
41
42 SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.in debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS
43 GEN_DIST = SDL2.spec
44
45 ifneq ($V,1)
46 RUN_CMD_AR     = @echo "  AR    " $@;
47 RUN_CMD_CC     = @echo "  CC    " $@;
48 RUN_CMD_CXX    = @echo "  CXX   " $@;
49 RUN_CMD_LTLINK = @echo "  LTLINK" $@;
50 RUN_CMD_RANLIB = @echo "  RANLIB" $@;
51 LIBTOOL += --quiet
52 endif
53
54 HDRS = \
55         SDL.h \
56         SDL_assert.h \
57         SDL_atomic.h \
58         SDL_audio.h \
59         SDL_bits.h \
60         SDL_blendmode.h \
61         SDL_clipboard.h \
62         SDL_cpuinfo.h \
63         SDL_egl.h \
64         SDL_endian.h \
65         SDL_error.h \
66         SDL_events.h \
67         SDL_filesystem.h \
68         SDL_gamecontroller.h \
69         SDL_gesture.h \
70         SDL_haptic.h \
71         SDL_hints.h \
72         SDL_joystick.h \
73         SDL_keyboard.h \
74         SDL_keycode.h \
75         SDL_loadso.h \
76         SDL_log.h \
77         SDL_main.h \
78         SDL_messagebox.h \
79         SDL_mouse.h \
80         SDL_mutex.h \
81         SDL_name.h \
82         SDL_opengl.h \
83         SDL_opengl_glext.h \
84         SDL_opengles.h \
85         SDL_opengles2_gl2ext.h \
86         SDL_opengles2_gl2.h \
87         SDL_opengles2_gl2platform.h \
88         SDL_opengles2.h \
89         SDL_opengles2_khrplatform.h \
90         SDL_pixels.h \
91         SDL_platform.h \
92         SDL_power.h \
93         SDL_quit.h \
94         SDL_rect.h \
95         SDL_render.h \
96         SDL_rwops.h \
97         SDL_scancode.h \
98         SDL_shape.h \
99         SDL_stdinc.h \
100         SDL_surface.h \
101         SDL_system.h \
102         SDL_syswm.h \
103         SDL_thread.h \
104         SDL_timer.h \
105         SDL_touch.h \
106         SDL_types.h \
107         SDL_version.h \
108         SDL_video.h \
109         begin_code.h \
110         close_code.h
111
112 SDLTEST_HDRS = $(shell ls $(srcdir)/include | fgrep SDL_test)
113
114 LT_AGE      = @LT_AGE@
115 LT_CURRENT  = @LT_CURRENT@
116 LT_RELEASE  = @LT_RELEASE@
117 LT_REVISION = @LT_REVISION@
118 LT_LDFLAGS  = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
119
120 all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
121
122 $(srcdir)/configure: $(srcdir)/configure.in
123         @echo "Warning, configure.in is out of date"
124         #(cd $(srcdir) && sh autogen.sh && sh configure)
125         @sleep 3
126
127 Makefile: $(srcdir)/Makefile.in
128         $(SHELL) config.status $@
129
130 Makefile.in:;
131
132 $(objects):
133         $(SHELL) $(auxdir)/mkinstalldirs $@
134
135 update-revision:
136         $(SHELL) $(auxdir)/updaterev.sh
137
138 .PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
139
140 $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
141         $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
142
143 $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
144         $(RUN_CMD_AR)$(AR) cru $@ $(SDLMAIN_OBJECTS)
145         $(RUN_CMD_RANLIB)$(RANLIB) $@
146
147 $(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
148         $(RUN_CMD_AR)$(AR) cru $@ $(SDLTEST_OBJECTS)
149         $(RUN_CMD_RANLIB)$(RANLIB) $@
150
151 install: all install-bin install-hdrs install-lib install-data
152 install-bin:
153         $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
154         $(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
155 install-hdrs: update-revision
156         $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
157         for file in $(HDRS) $(SDLTEST_HDRS); do \
158             $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL2/$$file; \
159         done
160         $(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL2/SDL_config.h
161         if test -f include/SDL_revision.h; then \
162             $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
163         else \
164             $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
165         fi
166
167 install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
168         $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
169         $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
170         $(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
171         $(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
172         $(INSTALL) -m 644 $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
173         $(RANLIB) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
174 install-data:
175         $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
176         $(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
177         $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
178         $(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
179         $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2
180         $(INSTALL) -m 644 sdl2-config.cmake $(DESTDIR)$(libdir)/cmake/SDL2
181
182 uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
183 uninstall-bin:
184         rm -f $(DESTDIR)$(bindir)/sdl2-config
185 uninstall-hdrs:
186         for file in $(HDRS) $(SDLTEST_HDRS); do \
187             rm -f $(DESTDIR)$(includedir)/SDL2/$$file; \
188         done
189         rm -f $(DESTDIR)$(includedir)/SDL2/SDL_config.h
190         rm -f $(DESTDIR)$(includedir)/SDL2/SDL_revision.h
191         -rmdir $(DESTDIR)$(includedir)/SDL2
192 uninstall-lib:
193         $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
194         rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
195         rm -f $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
196 uninstall-data:
197         rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
198         rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
199         rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config.cmake
200
201 clean:
202         rm -rf $(objects)
203         if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
204
205 distclean: clean
206         rm -f Makefile Makefile.rules sdl2-config
207         rm -f config.status config.cache config.log libtool
208         rm -rf $(srcdir)/autom4te*
209         find $(srcdir) \( \
210             -name '*~' -o \
211             -name '*.bak' -o \
212             -name '*.old' -o \
213             -name '*.rej' -o \
214             -name '*.orig' -o \
215             -name '.#*' \) \
216             -exec rm -f {} \;
217         if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
218
219 dist $(distfile):
220         $(SHELL) $(auxdir)/mkinstalldirs $(distdir)
221         (cd $(srcdir); tar cf - $(SRC_DIST)) | (cd $(distdir); tar xf -)
222         tar cf - $(GEN_DIST) | (cd $(distdir); tar xf -)
223         find $(distdir) \( \
224             -name '*~' -o \
225             -name '*.bak' -o \
226             -name '*.old' -o \
227             -name '*.rej' -o \
228             -name '*.orig' -o \
229             -name '.#*' \) \
230             -exec rm -f {} \;
231         if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
232         (cd $(distdir); build-scripts/updaterev.sh)
233         tar cvf - $(distdir) | gzip --best >$(distfile)
234         rm -rf $(distdir)
235
236 rpm: $(distfile)
237         rpmbuild -ta $?