Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Thu, 05 Jun 2014 09:27:06 -0700
changeset 8829 6ed74a27066a
parent 8827 d4ffa5194a49
child 8876 60edb019f0fe
permissions -rw-r--r--
Added missing headers that should be installed.
     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 configure configure.in debian include Makefile.* sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in src test VisualC.html VisualC Xcode Xcode-iOS
    43 GEN_DIST = SDL2.spec
    44 
    45 HDRS = \
    46 	SDL.h \
    47 	SDL_assert.h \
    48 	SDL_atomic.h \
    49 	SDL_audio.h \
    50 	SDL_bits.h \
    51 	SDL_blendmode.h \
    52 	SDL_clipboard.h \
    53 	SDL_cpuinfo.h \
    54 	SDL_egl.h \
    55 	SDL_endian.h \
    56 	SDL_error.h \
    57 	SDL_events.h \
    58 	SDL_filesystem.h \
    59 	SDL_gamecontroller.h \
    60 	SDL_gesture.h \
    61 	SDL_haptic.h \
    62 	SDL_hints.h \
    63 	SDL_joystick.h \
    64 	SDL_keyboard.h \
    65 	SDL_keycode.h \
    66 	SDL_loadso.h \
    67 	SDL_log.h \
    68 	SDL_main.h \
    69 	SDL_messagebox.h \
    70 	SDL_mouse.h \
    71 	SDL_mutex.h \
    72 	SDL_name.h \
    73 	SDL_opengl.h \
    74 	SDL_opengl_glext.h \
    75 	SDL_opengles.h \
    76 	SDL_opengles2_gl2ext.h \
    77 	SDL_opengles2_gl2.h \
    78 	SDL_opengles2_gl2platform.h \
    79 	SDL_opengles2.h \
    80 	SDL_opengles2_khrplatform.h \
    81 	SDL_pixels.h \
    82 	SDL_platform.h \
    83 	SDL_power.h \
    84 	SDL_quit.h \
    85 	SDL_rect.h \
    86 	SDL_render.h \
    87 	SDL_rwops.h \
    88 	SDL_scancode.h \
    89 	SDL_shape.h \
    90 	SDL_stdinc.h \
    91 	SDL_surface.h \
    92 	SDL_system.h \
    93 	SDL_syswm.h \
    94 	SDL_thread.h \
    95 	SDL_timer.h \
    96 	SDL_touch.h \
    97 	SDL_types.h \
    98 	SDL_version.h \
    99 	SDL_video.h \
   100 	begin_code.h \
   101 	close_code.h
   102 
   103 SDLTEST_HDRS = $(shell ls $(srcdir)/include | fgrep SDL_test)
   104 
   105 LT_AGE      = @LT_AGE@
   106 LT_CURRENT  = @LT_CURRENT@
   107 LT_RELEASE  = @LT_RELEASE@
   108 LT_REVISION = @LT_REVISION@
   109 LT_LDFLAGS  = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
   110 
   111 all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
   112 
   113 $(srcdir)/configure: $(srcdir)/configure.in
   114 	@echo "Warning, configure.in is out of date"
   115 	#(cd $(srcdir) && sh autogen.sh && sh configure)
   116 	@sleep 3
   117 
   118 Makefile: $(srcdir)/Makefile.in
   119 	$(SHELL) config.status $@
   120 
   121 Makefile.in:;
   122 
   123 $(objects):
   124 	$(SHELL) $(auxdir)/mkinstalldirs $@
   125 
   126 update-revision:
   127 	$(SHELL) $(auxdir)/updaterev.sh
   128 
   129 .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)
   130 
   131 $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
   132 	$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
   133 
   134 $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
   135 	$(AR) cru $@ $(SDLMAIN_OBJECTS)
   136 	$(RANLIB) $@
   137 
   138 $(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
   139 	$(AR) cru $@ $(SDLTEST_OBJECTS)
   140 	$(RANLIB) $@
   141 
   142 install: all install-bin install-hdrs install-lib install-data
   143 install-bin:
   144 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
   145 	$(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
   146 install-hdrs: update-revision
   147 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
   148 	for file in $(HDRS) $(SDLTEST_HDRS); do \
   149 	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL2/$$file; \
   150 	done
   151 	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL2/SDL_config.h
   152 	if test -f include/SDL_revision.h; then \
   153 	    $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
   154 	else \
   155 	    $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
   156 	fi
   157 
   158 install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
   159 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
   160 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
   161 	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   162 	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   163 	$(INSTALL) -m 644 $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
   164 	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
   165 install-data:
   166 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
   167 	$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
   168 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
   169 	$(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
   170 
   171 uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
   172 uninstall-bin:
   173 	rm -f $(DESTDIR)$(bindir)/sdl2-config
   174 uninstall-hdrs:
   175 	for file in $(HDRS) $(SDLTEST_HDRS); do \
   176 	    rm -f $(DESTDIR)$(includedir)/SDL2/$$file; \
   177 	done
   178 	rm -f $(DESTDIR)$(includedir)/SDL2/SDL_config.h
   179 	rm -f $(DESTDIR)$(includedir)/SDL2/SDL_revision.h
   180 	-rmdir $(DESTDIR)$(includedir)/SDL2
   181 uninstall-lib:
   182 	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
   183 	rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   184 	rm -f $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
   185 uninstall-data:
   186 	rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
   187 	rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
   188 
   189 clean:
   190 	rm -rf $(objects)
   191 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   192 
   193 distclean: clean
   194 	rm -f Makefile Makefile.rules sdl2-config
   195 	rm -f config.status config.cache config.log libtool
   196 	rm -rf $(srcdir)/autom4te*
   197 	find $(srcdir) \( \
   198 	    -name '*~' -o \
   199 	    -name '*.bak' -o \
   200 	    -name '*.old' -o \
   201 	    -name '*.rej' -o \
   202 	    -name '*.orig' -o \
   203 	    -name '.#*' \) \
   204 	    -exec rm -f {} \;
   205 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   206 
   207 dist $(distfile):
   208 	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
   209 	(cd $(srcdir); tar cf - $(SRC_DIST)) | (cd $(distdir); tar xf -)
   210 	tar cf - $(GEN_DIST) | (cd $(distdir); tar xf -)
   211 	find $(distdir) \( \
   212 	    -name '*~' -o \
   213 	    -name '*.bak' -o \
   214 	    -name '*.old' -o \
   215 	    -name '*.rej' -o \
   216 	    -name '*.orig' -o \
   217 	    -name '.#*' \) \
   218 	    -exec rm -f {} \;
   219 	if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
   220 	(cd $(distdir); build-scripts/updaterev.sh)
   221 	tar cvf - $(distdir) | gzip --best >$(distfile)
   222 	rm -rf $(distdir)
   223 
   224 rpm: $(distfile)
   225 	rpmbuild -ta $?