Makefile.in
author Steven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca>
Sat, 19 Apr 2014 16:33:42 -0700
changeset 8743 4f1fc737b017
parent 7667 be1cc6f55840
child 8827 d4ffa5194a49
permissions -rw-r--r--
Set the tag type in libtool invocations

Setting the tag type will let libtool work even when it cannot infer
the type of the code being built. One way libtool may fail to infer
the tag type is if one uses a mock compiler (such as for static
analysis).
     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_endian.h \
    55 	SDL_error.h \
    56 	SDL_events.h \
    57 	SDL_filesystem.h \
    58 	SDL_gamecontroller.h \
    59 	SDL_gesture.h \
    60 	SDL_haptic.h \
    61 	SDL_hints.h \
    62 	SDL_joystick.h \
    63 	SDL_keyboard.h \
    64 	SDL_keycode.h \
    65 	SDL_loadso.h \
    66 	SDL_log.h \
    67 	SDL_main.h \
    68 	SDL_messagebox.h \
    69 	SDL_mouse.h \
    70 	SDL_mutex.h \
    71 	SDL_name.h \
    72 	SDL_opengl.h \
    73 	SDL_opengles.h \
    74 	SDL_opengles2.h \
    75 	SDL_pixels.h \
    76 	SDL_platform.h \
    77 	SDL_power.h \
    78 	SDL_quit.h \
    79 	SDL_rect.h \
    80 	SDL_render.h \
    81 	SDL_rwops.h \
    82 	SDL_scancode.h \
    83 	SDL_shape.h \
    84 	SDL_stdinc.h \
    85 	SDL_surface.h \
    86 	SDL_system.h \
    87 	SDL_syswm.h \
    88 	SDL_thread.h \
    89 	SDL_timer.h \
    90 	SDL_touch.h \
    91 	SDL_types.h \
    92 	SDL_version.h \
    93 	SDL_video.h \
    94 	begin_code.h \
    95 	close_code.h
    96 
    97 SDLTEST_HDRS = $(shell ls $(srcdir)/include | fgrep SDL_test)
    98 
    99 LT_AGE      = @LT_AGE@
   100 LT_CURRENT  = @LT_CURRENT@
   101 LT_RELEASE  = @LT_RELEASE@
   102 LT_REVISION = @LT_REVISION@
   103 LT_LDFLAGS  = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
   104 
   105 all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
   106 
   107 $(srcdir)/configure: $(srcdir)/configure.in
   108 	@echo "Warning, configure.in is out of date"
   109 	#(cd $(srcdir) && sh autogen.sh && sh configure)
   110 	@sleep 3
   111 
   112 Makefile: $(srcdir)/Makefile.in
   113 	$(SHELL) config.status $@
   114 
   115 Makefile.in:;
   116 
   117 $(objects):
   118 	$(SHELL) $(auxdir)/mkinstalldirs $@
   119 
   120 update-revision:
   121 	$(SHELL) $(auxdir)/updaterev.sh
   122 
   123 .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)
   124 
   125 $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
   126 	$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
   127 
   128 $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
   129 	$(AR) cru $@ $(SDLMAIN_OBJECTS)
   130 	$(RANLIB) $@
   131 
   132 $(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
   133 	$(AR) cru $@ $(SDLTEST_OBJECTS)
   134 	$(RANLIB) $@
   135 
   136 install: all install-bin install-hdrs install-lib install-data
   137 install-bin:
   138 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
   139 	$(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
   140 install-hdrs: update-revision
   141 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
   142 	for file in $(HDRS) $(SDLTEST_HDRS); do \
   143 	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL2/$$file; \
   144 	done
   145 	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL2/SDL_config.h
   146 	if test -f include/SDL_revision.h; then \
   147 	    $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
   148 	else \
   149 	    $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
   150 	fi
   151 
   152 install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
   153 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
   154 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
   155 	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   156 	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   157 	$(INSTALL) -m 644 $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
   158 	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
   159 install-data:
   160 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
   161 	$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
   162 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
   163 	$(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
   164 
   165 uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
   166 uninstall-bin:
   167 	rm -f $(DESTDIR)$(bindir)/sdl2-config
   168 uninstall-hdrs:
   169 	for file in $(HDRS) $(SDLTEST_HDRS); do \
   170 	    rm -f $(DESTDIR)$(includedir)/SDL2/$$file; \
   171 	done
   172 	rm -f $(DESTDIR)$(includedir)/SDL2/SDL_config.h
   173 	rm -f $(DESTDIR)$(includedir)/SDL2/SDL_revision.h
   174 	-rmdir $(DESTDIR)$(includedir)/SDL2
   175 uninstall-lib:
   176 	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
   177 	rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   178 	rm -f $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
   179 uninstall-data:
   180 	rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
   181 	rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
   182 
   183 clean:
   184 	rm -rf $(objects)
   185 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   186 
   187 distclean: clean
   188 	rm -f Makefile Makefile.rules sdl2-config
   189 	rm -f config.status config.cache config.log libtool
   190 	rm -rf $(srcdir)/autom4te*
   191 	find $(srcdir) \( \
   192 	    -name '*~' -o \
   193 	    -name '*.bak' -o \
   194 	    -name '*.old' -o \
   195 	    -name '*.rej' -o \
   196 	    -name '*.orig' -o \
   197 	    -name '.#*' \) \
   198 	    -exec rm -f {} \;
   199 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   200 
   201 dist $(distfile):
   202 	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
   203 	(cd $(srcdir); tar cf - $(SRC_DIST)) | (cd $(distdir); tar xf -)
   204 	tar cf - $(GEN_DIST) | (cd $(distdir); tar xf -)
   205 	find $(distdir) \( \
   206 	    -name '*~' -o \
   207 	    -name '*.bak' -o \
   208 	    -name '*.old' -o \
   209 	    -name '*.rej' -o \
   210 	    -name '*.orig' -o \
   211 	    -name '.#*' \) \
   212 	    -exec rm -f {} \;
   213 	if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
   214 	(cd $(distdir); build-scripts/updaterev.sh)
   215 	tar cvf - $(distdir) | gzip --best >$(distfile)
   216 	rm -rf $(distdir)
   217 
   218 rpm: $(distfile)
   219 	rpmbuild -ta $?