Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Wed, 03 Oct 2012 20:49:16 -0700
changeset 6555 f2c03c06d987
parent 6345 b4bbb23d1b4b
child 6607 a7e743825ede
permissions -rw-r--r--
Fixed bug 1614 - SDL for Android does not implement TextInput API

Andrey Isakov 2012-10-03 08:30:25 PDT

I've found out in the process of porting one OS project to Android/SDL2 that
there is no support for TextInput events/APIs on Android.
So I implemented some kind of initial support of that feature, and at the very
least it seems to work fine with latin chars input with soft and hardware
keyboards on my Moto Milestone2. I've also tried playing around with more
complex IMEs, like japanese, logging the process and it seemed to work too. I'm
not sure since the app itself I am working on does not have support for
non-latin input.

The main point of the patch is to place a fake input view in the region
specified by SDL_SetTextInputRect and create a custom InputConnection for it.
The reason to make it a separate view is to support Android's pan&scan on input
feature properly. For details please refer to
http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html
Even though the manual states that SetTextInputRect is used to determine the
IME variants position, I thought this would be a proper use for this too.
slouken@1362
     1
# Makefile to build and install the SDL library
slouken@1362
     2
slouken@1362
     3
top_builddir = .
slouken@1362
     4
srcdir  = @srcdir@
slouken@1362
     5
objects = build
slouken@1362
     6
prefix = @prefix@
slouken@1362
     7
exec_prefix = @exec_prefix@
slouken@2156
     8
bindir	= @bindir@
slouken@2156
     9
libdir  = @libdir@
slouken@2156
    10
includedir = @includedir@
slouken@2156
    11
datarootdir = @datarootdir@
slouken@2156
    12
datadir	= @datadir@
slouken@1391
    13
auxdir	= @ac_aux_dir@
slouken@1362
    14
distpath = $(srcdir)/..
slouken@6250
    15
distdir = SDL2-@SDL_VERSION@
slouken@1362
    16
distfile = $(distdir).tar.gz
slouken@1362
    17
slouken@1380
    18
@SET_MAKE@
slouken@1362
    19
SHELL	= @SHELL@
slouken@1362
    20
CC      = @CC@
slouken@1362
    21
INCLUDE = @INCLUDE@
slouken@1362
    22
CFLAGS  = @BUILD_CFLAGS@
slouken@1521
    23
EXTRA_CFLAGS = @EXTRA_CFLAGS@
slouken@1393
    24
LDFLAGS = @BUILD_LDFLAGS@
slouken@1521
    25
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
slouken@1362
    26
LIBTOOL = @LIBTOOL@
slouken@1362
    27
INSTALL = @INSTALL@
slouken@1419
    28
AR	= @AR@
slouken@1419
    29
RANLIB	= @RANLIB@
slouken@2204
    30
WINDRES	= @WINDRES@
slouken@1362
    31
slouken@6250
    32
TARGET  = libSDL2.la
slouken@1362
    33
OBJECTS = @OBJECTS@
slouken@3334
    34
VERSION_OBJECTS = @VERSION_OBJECTS@
slouken@1362
    35
slouken@6250
    36
SDLMAIN_TARGET = libSDL2main.a
slouken@1397
    37
SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
slouken@1397
    38
slouken@6254
    39
SRC_DIST = acinclude Android.mk autogen.sh BUGS build-scripts configure configure.in COPYING CREDITS include INSTALL Makefile.minimal Makefile.in README* sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in src test TODO VisualC.html VisualC VisualCE WhatsNew Xcode Xcode-iOS
slouken@6250
    40
GEN_DIST = SDL2.spec
slouken@1362
    41
slouken@4929
    42
HDRS = \
slouken@4929
    43
	SDL.h \
slouken@4929
    44
	SDL_assert.h \
slouken@4929
    45
	SDL_atomic.h \
slouken@4929
    46
	SDL_audio.h \
slouken@4929
    47
	SDL_blendmode.h \
slouken@4929
    48
	SDL_clipboard.h \
slouken@4929
    49
	SDL_cpuinfo.h \
slouken@4929
    50
	SDL_endian.h \
slouken@4929
    51
	SDL_error.h \
slouken@4929
    52
	SDL_events.h \
slouken@4929
    53
	SDL_gesture.h \
slouken@4929
    54
	SDL_haptic.h \
slouken@5189
    55
	SDL_hints.h \
slouken@4929
    56
	SDL_input.h \
slouken@4929
    57
	SDL_joystick.h \
slouken@4929
    58
	SDL_keyboard.h \
slouken@5340
    59
	SDL_keycode.h \
slouken@4929
    60
	SDL_loadso.h \
slouken@5221
    61
	SDL_log.h \
slouken@4929
    62
	SDL_main.h \
slouken@4929
    63
	SDL_mouse.h \
slouken@4929
    64
	SDL_mutex.h \
slouken@4929
    65
	SDL_name.h \
slouken@4929
    66
	SDL_opengl.h \
slouken@4929
    67
	SDL_opengles.h \
slouken@6205
    68
	SDL_opengles2.h \
slouken@4929
    69
	SDL_pixels.h \
slouken@4929
    70
	SDL_platform.h \
slouken@4929
    71
	SDL_power.h \
slouken@4929
    72
	SDL_quit.h \
slouken@4929
    73
	SDL_rect.h \
slouken@5145
    74
	SDL_render.h \
slouken@4929
    75
	SDL_rwops.h \
slouken@4929
    76
	SDL_scancode.h \
slouken@4929
    77
	SDL_shape.h \
slouken@4929
    78
	SDL_stdinc.h \
slouken@4929
    79
	SDL_surface.h \
slouken@6345
    80
	SDL_system.h \
slouken@4929
    81
	SDL_syswm.h \
slouken@4929
    82
	SDL_thread.h \
slouken@4929
    83
	SDL_timer.h \
slouken@4929
    84
	SDL_touch.h \
slouken@4929
    85
	SDL_types.h \
slouken@4929
    86
	SDL_version.h \
slouken@4929
    87
	SDL_video.h \
slouken@4929
    88
	begin_code.h \
slouken@4929
    89
	close_code.h
slouken@2122
    90
slouken@1362
    91
LT_AGE      = @LT_AGE@
slouken@1362
    92
LT_CURRENT  = @LT_CURRENT@
slouken@1362
    93
LT_RELEASE  = @LT_RELEASE@
slouken@1362
    94
LT_REVISION = @LT_REVISION@
slouken@2156
    95
LT_LDFLAGS  = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
slouken@1362
    96
slouken@5324
    97
all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
slouken@1622
    98
slouken@1622
    99
$(srcdir)/configure: $(srcdir)/configure.in
slouken@1622
   100
	@echo "Warning, configure.in is out of date"
slouken@1622
   101
	#(cd $(srcdir) && sh autogen.sh && sh configure)
slouken@1623
   102
	@sleep 3
slouken@1362
   103
slouken@1362
   104
Makefile: $(srcdir)/Makefile.in
slouken@1362
   105
	$(SHELL) config.status $@
slouken@1362
   106
slouken@3416
   107
Makefile.in:;
slouken@3416
   108
slouken@1362
   109
$(objects):
slouken@1391
   110
	$(SHELL) $(auxdir)/mkinstalldirs $@
slouken@1362
   111
slouken@2982
   112
update-revision:
slouken@2982
   113
	$(SHELL) $(auxdir)/updaterev.sh
slouken@2982
   114
slouken@5346
   115
.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)
slouken@1362
   116
slouken@5345
   117
$(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
slouken@3334
   118
	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
slouken@1362
   119
slouken@1397
   120
$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
slouken@1419
   121
	$(AR) cru $@ $(SDLMAIN_OBJECTS)
slouken@1419
   122
	$(RANLIB) $@
slouken@1397
   123
slouken@3352
   124
install: all install-bin install-hdrs install-lib install-data
slouken@1362
   125
install-bin:
slouken@2156
   126
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
slouken@6250
   127
	$(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
slouken@5345
   128
install-hdrs: update-revision
slouken@6250
   129
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
slouken@2122
   130
	for file in $(HDRS); do \
slouken@6250
   131
	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL2/$$file; \
slouken@1362
   132
	done
slouken@6250
   133
	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL2/SDL_config.h
slouken@5345
   134
	if test -f include/SDL_revision.h; then \
slouken@6250
   135
	    $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
slouken@5345
   136
	else \
slouken@6250
   137
	    $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
slouken@5345
   138
	fi
slouken@5345
   139
slouken@2151
   140
install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
slouken@2156
   141
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
slouken@2156
   142
	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
slouken@2156
   143
	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
slouken@2156
   144
	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
slouken@1362
   145
install-data:
slouken@2156
   146
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
slouken@6250
   147
	$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
slouken@2156
   148
	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
slouken@6250
   149
	$(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
slouken@1362
   150
slouken@3352
   151
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
slouken@1362
   152
uninstall-bin:
slouken@6250
   153
	rm -f $(DESTDIR)$(bindir)/sdl2-config
slouken@1362
   154
uninstall-hdrs:
slouken@2122
   155
	for file in $(HDRS); do \
slouken@6250
   156
	    rm -f $(DESTDIR)$(includedir)/SDL2/$$file; \
slouken@1362
   157
	done
slouken@6250
   158
	rm -f $(DESTDIR)$(includedir)/SDL2/SDL_config.h
slouken@6250
   159
	rm -f $(DESTDIR)$(includedir)/SDL2/SDL_revision.h
slouken@6250
   160
	-rmdir $(DESTDIR)$(includedir)/SDL2
slouken@1362
   161
uninstall-lib:
slouken@2156
   162
	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
slouken@2156
   163
	rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
slouken@1362
   164
uninstall-data:
slouken@6250
   165
	rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
slouken@6250
   166
	rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
slouken@1362
   167
slouken@1362
   168
clean:
slouken@1362
   169
	rm -rf $(objects)
slouken@1380
   170
	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
slouken@1362
   171
slouken@1362
   172
distclean: clean
slouken@6250
   173
	rm -f Makefile Makefile.rules sdl2-config
slouken@3334
   174
	rm -f config.status config.cache config.log libtool
slouken@1362
   175
	rm -rf $(srcdir)/autom4te*
slouken@1603
   176
	find $(srcdir) \( \
slouken@1603
   177
	    -name '*~' -o \
slouken@1603
   178
	    -name '*.bak' -o \
slouken@1603
   179
	    -name '*.old' -o \
slouken@1603
   180
	    -name '*.rej' -o \
slouken@1603
   181
	    -name '*.orig' -o \
slouken@1603
   182
	    -name '.#*' \) \
slouken@1362
   183
	    -exec rm -f {} \;
slouken@1380
   184
	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
slouken@1362
   185
slouken@1362
   186
dist $(distfile):
slouken@1391
   187
	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
slouken@5498
   188
	(cd $(srcdir); tar cf - $(SRC_DIST)) | (cd $(distdir); tar xf -)
slouken@5498
   189
	tar cf - $(GEN_DIST) | (cd $(distdir); tar xf -)
slouken@1846
   190
	find $(distdir) \( \
slouken@1845
   191
	    -name '*~' -o \
slouken@1845
   192
	    -name '*.bak' -o \
slouken@1845
   193
	    -name '*.old' -o \
slouken@1845
   194
	    -name '*.rej' -o \
slouken@1845
   195
	    -name '*.orig' -o \
slouken@1845
   196
	    -name '.#*' \) \
slouken@1845
   197
	    -exec rm -f {} \;
slouken@1848
   198
	if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
slouken@1362
   199
	tar cvf - $(distdir) | gzip --best >$(distfile)
slouken@1362
   200
	rm -rf $(distdir)
slouken@1362
   201
slouken@1362
   202
rpm: $(distfile)
slouken@1362
   203
	rpmbuild -ta $?
slouken@1424
   204
slouken@1895
   205
# Run indent on the source to standardize coding style
slouken@1895
   206
indent:
slouken@1895
   207
	@echo "Running indent... modified files:"
slouken@1895
   208
	@cd $(srcdir) && \
slouken@1895
   209
	find . \( \
slouken@1895
   210
	    -name '*.h' -o \
slouken@1895
   211
	    -name '*.c' -o \
slouken@1895
   212
	    -name '*.cc' \) \
slouken@2220
   213
	    -print | fgrep -v ./Xcode | \
slouken@1895
   214
	while read file; do \
slouken@1895
   215
	    indent "$$file" -o "$$file.indent"; \
slouken@1895
   216
	    if cmp "$$file" "$$file.indent" >/dev/null; then \
slouken@1895
   217
	        rm -f "$$file.indent"; \
slouken@1895
   218
	    else \
slouken@1895
   219
	        echo "$$file"; \
slouken@1895
   220
	        mv -f "$$file.indent" "$$file"; \
slouken@1895
   221
	    fi; \
slouken@1895
   222
	done
slouken@1895
   223
slouken@1895
   224
# Run indent and then commit modified files
slouken@1895
   225
commit: indent
slouken@5310
   226
	hg commit