[SDL_Tizen] Fix svace issue and so name
[platform/upstream/SDL.git] / Makefile.in
index ab51035..b66e0f5 100644 (file)
@@ -3,7 +3,6 @@
 top_builddir = .
 srcdir  = @srcdir@
 objects = build
-depend = build-deps
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 bindir = @bindir@
@@ -11,10 +10,9 @@ libdir  = @libdir@
 includedir = @includedir@
 datarootdir = @datarootdir@
 datadir        = @datadir@
-mandir = @mandir@
 auxdir = @ac_aux_dir@
 distpath = $(srcdir)/..
-distdir = SDL-@SDL_VERSION@
+distdir = SDL2-@SDL_VERSION@
 distfile = $(distdir).tar.gz
 
 @SET_MAKE@
@@ -27,23 +25,91 @@ LDFLAGS = @BUILD_LDFLAGS@
 EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
 LIBTOOL = @LIBTOOL@
 INSTALL = @INSTALL@
-NASM   = @NASM@ @NASMFLAGS@
 AR     = @AR@
 RANLIB = @RANLIB@
 WINDRES        = @WINDRES@
 
-TARGET  = libSDL.la
-SOURCES = @SOURCES@
+TARGET  = libSDL2.la
 OBJECTS = @OBJECTS@
+VERSION_OBJECTS = @VERSION_OBJECTS@
 
-SDLMAIN_TARGET = libSDLmain.la
-SDLMAIN_SOURCES = @SDLMAIN_SOURCES@
+SDLMAIN_TARGET = libSDL2main.a
 SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
-SDLMAIN_LDFLAGS = @SDLMAIN_LDFLAGS@
 
-DIST = acinclude autogen.sh Borland.html Borland.zip BUGS build-scripts configure configure.in COPYING CREDITS CWprojects.sea.bin docs docs.html include INSTALL Makefile.dc Makefile.minimal Makefile.in MPWmake.sea.bin README* sdl-config.in sdl.m4 sdl.pc.in SDL.qpg.in SDL.spec SDL.spec.in src test TODO VisualCE VisualC.html VisualC Watcom-OS2.zip Watcom-Win32.zip symbian.zip WhatsNew Xcode
-
-HDRS = SDL.h SDL_active.h SDL_audio.h SDL_byteorder.h SDL_cdrom.h SDL_cpuinfo.h SDL_endian.h SDL_error.h SDL_events.h SDL_getenv.h SDL_joystick.h SDL_keyboard.h SDL_keysym.h SDL_loadso.h SDL_main.h SDL_mouse.h SDL_mutex.h SDL_name.h SDL_opengl.h SDL_platform.h SDL_quit.h SDL_rwops.h SDL_stdinc.h SDL_syswm.h SDL_thread.h SDL_timer.h SDL_types.h SDL_version.h SDL_video.h begin_code.h close_code.h
+SDLTEST_TARGET = libSDL2_test.a
+SDLTEST_OBJECTS = @SDLTEST_OBJECTS@
+
+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
+GEN_DIST = SDL2.spec
+
+ifneq ($V,1)
+RUN_CMD_AR     = @echo "  AR    " $@;
+RUN_CMD_CC     = @echo "  CC    " $@;
+RUN_CMD_CXX    = @echo "  CXX   " $@;
+RUN_CMD_LTLINK = @echo "  LTLINK" $@;
+RUN_CMD_RANLIB = @echo "  RANLIB" $@;
+LIBTOOL += --quiet
+endif
+
+HDRS = \
+       SDL.h \
+       SDL_assert.h \
+       SDL_atomic.h \
+       SDL_audio.h \
+       SDL_bits.h \
+       SDL_blendmode.h \
+       SDL_clipboard.h \
+       SDL_cpuinfo.h \
+       SDL_egl.h \
+       SDL_endian.h \
+       SDL_error.h \
+       SDL_events.h \
+       SDL_filesystem.h \
+       SDL_gamecontroller.h \
+       SDL_gesture.h \
+       SDL_haptic.h \
+       SDL_hints.h \
+       SDL_joystick.h \
+       SDL_keyboard.h \
+       SDL_keycode.h \
+       SDL_loadso.h \
+       SDL_log.h \
+       SDL_main.h \
+       SDL_messagebox.h \
+       SDL_mouse.h \
+       SDL_mutex.h \
+       SDL_name.h \
+       SDL_opengl.h \
+       SDL_opengl_glext.h \
+       SDL_opengles.h \
+       SDL_opengles2_gl2ext.h \
+       SDL_opengles2_gl2.h \
+       SDL_opengles2_gl2platform.h \
+       SDL_opengles2.h \
+       SDL_opengles2_khrplatform.h \
+       SDL_pixels.h \
+       SDL_platform.h \
+       SDL_power.h \
+       SDL_quit.h \
+       SDL_rect.h \
+       SDL_render.h \
+       SDL_rwops.h \
+       SDL_scancode.h \
+       SDL_shape.h \
+       SDL_stdinc.h \
+       SDL_surface.h \
+       SDL_system.h \
+       SDL_syswm.h \
+       SDL_thread.h \
+       SDL_timer.h \
+       SDL_touch.h \
+       SDL_types.h \
+       SDL_version.h \
+       SDL_video.h \
+       begin_code.h \
+       close_code.h
+
+SDLTEST_HDRS = $(shell ls $(srcdir)/include | fgrep SDL_test)
 
 LT_AGE      = @LT_AGE@
 LT_CURRENT  = @LT_CURRENT@
@@ -51,7 +117,7 @@ LT_RELEASE  = @LT_RELEASE@
 LT_REVISION = @LT_REVISION@
 LT_LDFLAGS  = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
 
-all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
+all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
 
 $(srcdir)/configure: $(srcdir)/configure.in
        @echo "Warning, configure.in is out of date"
@@ -61,80 +127,85 @@ $(srcdir)/configure: $(srcdir)/configure.in
 Makefile: $(srcdir)/Makefile.in
        $(SHELL) config.status $@
 
+Makefile.in:;
+
 $(objects):
        $(SHELL) $(auxdir)/mkinstalldirs $@
 
-.PHONY: all depend install install-bin install-hdrs install-lib install-data install-man uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-man clean distclean dist
-depend:
-       @SOURCES="$(SOURCES) $(SDLMAIN_SOURCES)" INCLUDE="$(INCLUDE)" output="$(depend)" \
-       $(SHELL) $(auxdir)/makedep.sh
+update-revision:
+       $(SHELL) $(auxdir)/updaterev.sh
 
-include $(depend)
+.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)
 
-$(objects)/$(TARGET): $(OBJECTS)
-       $(LIBTOOL) --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
+$(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
+       $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
 
 $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
-       $(LIBTOOL) --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) $(SDLMAIN_LDFLAGS)
+       $(RUN_CMD_AR)$(AR) cru $@ $(SDLMAIN_OBJECTS)
+       $(RUN_CMD_RANLIB)$(RANLIB) $@
 
+$(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
+       $(RUN_CMD_AR)$(AR) cru $@ $(SDLTEST_OBJECTS)
+       $(RUN_CMD_RANLIB)$(RANLIB) $@
 
-install: all install-bin install-hdrs install-lib install-data install-man
+install: all install-bin install-hdrs install-lib install-data
 install-bin:
        $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
-       $(INSTALL) -m 755 sdl-config $(DESTDIR)$(bindir)/sdl-config
-install-hdrs:
-       $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL
-       for file in $(HDRS); do \
-           $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL/$$file; \
+       $(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
+install-hdrs: update-revision
+       $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
+       for file in $(HDRS) $(SDLTEST_HDRS); do \
+           $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL2/$$file; \
        done
-       $(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL/SDL_config.h
-install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
+       $(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL2/SDL_config.h
+       if test -f include/SDL_revision.h; then \
+           $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
+       else \
+           $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
+       fi
+
+install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
        $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
        $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
-       $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
+       $(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
+       $(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
+       $(INSTALL) -m 644 $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
+       $(RANLIB) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
 install-data:
        $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
-       $(INSTALL) -m 644 $(srcdir)/sdl.m4 $(DESTDIR)$(datadir)/aclocal/sdl.m4
+       $(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
        $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
-       $(INSTALL) -m 644 sdl.pc $(DESTDIR)$(libdir)/pkgconfig
-install-man:
-       $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(mandir)/man3
-       for src in $(srcdir)/docs/man3/*.3; do \
-           file=`echo $$src | sed -e 's|^.*/||'`; \
-           $(INSTALL) -m 644 $$src $(DESTDIR)$(mandir)/man3/$$file; \
-       done
+       $(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
+       $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2
+       $(INSTALL) -m 644 sdl2-config.cmake $(DESTDIR)$(libdir)/cmake/SDL2
 
-uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-man
+uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
 uninstall-bin:
-       rm -f $(DESTDIR)$(bindir)/sdl-config
+       rm -f $(DESTDIR)$(bindir)/sdl2-config
 uninstall-hdrs:
-       for file in $(HDRS); do \
-           rm -f $(DESTDIR)$(includedir)/SDL/$$file; \
+       for file in $(HDRS) $(SDLTEST_HDRS); do \
+           rm -f $(DESTDIR)$(includedir)/SDL2/$$file; \
        done
-       rm -f $(DESTDIR)$(includedir)/SDL/SDL_config.h
-       -rmdir $(DESTDIR)$(includedir)/SDL
+       rm -f $(DESTDIR)$(includedir)/SDL2/SDL_config.h
+       rm -f $(DESTDIR)$(includedir)/SDL2/SDL_revision.h
+       -rmdir $(DESTDIR)$(includedir)/SDL2
 uninstall-lib:
        $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
-       $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
+       rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
+       rm -f $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
 uninstall-data:
-       rm -f $(DESTDIR)$(datadir)/aclocal/sdl.m4
-       rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl.pc
-uninstall-man:
-       for src in $(srcdir)/docs/man3/*.3; do \
-           file=`echo $$src | sed -e 's|^.*/||'`; \
-           rm -f $(DESTDIR)$(mandir)/man3/$$file; \
-       done
+       rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
+       rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
+       rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config.cmake
 
 clean:
        rm -rf $(objects)
        if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
 
 distclean: clean
-       rm -f Makefile include/SDL_config.h sdl-config
-       rm -f SDL.qpg
-       rm -f config.status config.cache config.log libtool $(depend)
+       rm -f Makefile Makefile.rules sdl2-config
+       rm -f config.status config.cache config.log libtool
        rm -rf $(srcdir)/autom4te*
-       rm -rf $(srcdir)/test/autom4te*
        find $(srcdir) \( \
            -name '*~' -o \
            -name '*.bak' -o \
@@ -143,15 +214,12 @@ distclean: clean
            -name '*.orig' -o \
            -name '.#*' \) \
            -exec rm -f {} \;
-       cp $(srcdir)/include/SDL_config.h.default $(srcdir)/include/SDL_config.h
        if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
 
 dist $(distfile):
        $(SHELL) $(auxdir)/mkinstalldirs $(distdir)
-       tar cf - $(DIST) | (cd $(distdir); tar xf -)
-       cp $(distdir)/include/SDL_config.h.default $(distdir)/include/SDL_config.h
-       rm -rf `find $(distdir) -name .svn`
-       rm -rf $(distdir)/test/autom4te*
+       (cd $(srcdir); tar cf - $(SRC_DIST)) | (cd $(distdir); tar xf -)
+       tar cf - $(GEN_DIST) | (cd $(distdir); tar xf -)
        find $(distdir) \( \
            -name '*~' -o \
            -name '*.bak' -o \
@@ -161,18 +229,9 @@ dist $(distfile):
            -name '.#*' \) \
            -exec rm -f {} \;
        if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
+       (cd $(distdir); build-scripts/updaterev.sh)
        tar cvf - $(distdir) | gzip --best >$(distfile)
        rm -rf $(distdir)
 
 rpm: $(distfile)
        rpmbuild -ta $?
-
-# Create a SVN snapshot that people can run update on
-snapshot:
-       svn co http://svn.libsdl.org/branches/SDL-1.2
-       (cd SDL-1.2 && ./autogen.sh && rm -rf autom4te.cache)
-       cp SDL-1.2/include/SDL_config.h.default SDL-1.2/include/SDL_config.h
-       tar zcf $(HOME)/SDL-1.2.tar.gz SDL-1.2
-       rm -f $(HOME)/SDL-1.2.zip
-       zip -r $(HOME)/SDL-1.2.zip SDL-1.2
-       rm -rf SDL-1.2