Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Mon, 10 Jan 2011 12:15:16 -0800
changeset 4970 b9eed029844a
parent 4929 aa8888658021
child 5048 187d7d446306
permissions -rw-r--r--
Include the Android Makefile in the distribution files
     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 = SDL-@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 NASM	= @NASM@ @NASMFLAGS@
    29 AR	= @AR@
    30 RANLIB	= @RANLIB@
    31 WINDRES	= @WINDRES@
    32 
    33 TARGET  = libSDL.la
    34 OBJECTS = @OBJECTS@
    35 VERSION_OBJECTS = @VERSION_OBJECTS@
    36 
    37 SDLMAIN_TARGET = libSDLmain.a
    38 SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
    39 
    40 # PS3 SPU programs
    41 SPU_GCC = @SPU_GCC@
    42 EMBEDSPU = @EMBEDSPU@
    43 #include $(srcdir)/src/video/ps3/spulibs/Makefile
    44 
    45 DIST = acinclude Android.mk autogen.sh Borland.html Borland.zip BUGS build-scripts configure configure.in COPYING CREDITS include INSTALL Makefile.minimal Makefile.in README* sdl-config.in sdl.m4 sdl.pc.in SDL.spec SDL.spec.in src test TODO VisualC.html VisualC VisualCE Watcom-Win32.zip WhatsNew Xcode Xcode-iPhoneOS
    46 
    47 HDRS = \
    48 	SDL.h \
    49 	SDL_assert.h \
    50 	SDL_atomic.h \
    51 	SDL_audio.h \
    52 	SDL_blendmode.h \
    53 	SDL_clipboard.h \
    54 	SDL_compat.h \
    55 	SDL_cpuinfo.h \
    56 	SDL_endian.h \
    57 	SDL_error.h \
    58 	SDL_events.h \
    59 	SDL_gesture.h \
    60 	SDL_haptic.h \
    61 	SDL_input.h \
    62 	SDL_joystick.h \
    63 	SDL_keyboard.h \
    64 	SDL_keysym.h \
    65 	SDL_loadso.h \
    66 	SDL_main.h \
    67 	SDL_mouse.h \
    68 	SDL_mutex.h \
    69 	SDL_name.h \
    70 	SDL_opengl.h \
    71 	SDL_opengles.h \
    72 	SDL_pixels.h \
    73 	SDL_platform.h \
    74 	SDL_power.h \
    75 	SDL_quit.h \
    76 	SDL_rect.h \
    77 	SDL_revision.h \
    78 	SDL_rwops.h \
    79 	SDL_scalemode.h \
    80 	SDL_scancode.h \
    81 	SDL_shape.h \
    82 	SDL_stdinc.h \
    83 	SDL_surface.h \
    84 	SDL_syswm.h \
    85 	SDL_thread.h \
    86 	SDL_timer.h \
    87 	SDL_touch.h \
    88 	SDL_types.h \
    89 	SDL_version.h \
    90 	SDL_video.h \
    91 	begin_code.h \
    92 	close_code.h
    93 
    94 LT_AGE      = @LT_AGE@
    95 LT_CURRENT  = @LT_CURRENT@
    96 LT_RELEASE  = @LT_RELEASE@
    97 LT_REVISION = @LT_REVISION@
    98 LT_LDFLAGS  = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
    99 
   100 all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
   101 
   102 $(srcdir)/configure: $(srcdir)/configure.in
   103 	@echo "Warning, configure.in is out of date"
   104 	#(cd $(srcdir) && sh autogen.sh && sh configure)
   105 	@sleep 3
   106 
   107 Makefile: $(srcdir)/Makefile.in
   108 	$(SHELL) config.status $@
   109 
   110 Makefile.in:;
   111 
   112 $(objects):
   113 	$(SHELL) $(auxdir)/mkinstalldirs $@
   114 
   115 # To make sure parallel builds will not fail
   116 $(srcdir)/include/SDL_revision.h: update-revision
   117 
   118 update-revision:
   119 	$(SHELL) $(auxdir)/updaterev.sh
   120 
   121 .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)
   122 
   123 -include $(OBJECTS:.lo=.d)
   124 @DEPENDS@
   125 @VERSION_DEPENDS@
   126 @SDLMAIN_DEPENDS@
   127 
   128 $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
   129 	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
   130 
   131 $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
   132 	$(AR) cru $@ $(SDLMAIN_OBJECTS)
   133 	$(RANLIB) $@
   134 
   135 install: all install-bin install-hdrs install-lib install-data
   136 install-bin:
   137 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
   138 	$(INSTALL) -m 755 sdl-config $(DESTDIR)$(bindir)/sdl-config
   139 install-hdrs:
   140 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL
   141 	for file in $(HDRS); do \
   142 	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL/$$file; \
   143 	done
   144 	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL/SDL_config.h
   145 install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
   146 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
   147 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
   148 	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   149 	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   150 install-data:
   151 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
   152 	$(INSTALL) -m 644 $(srcdir)/sdl.m4 $(DESTDIR)$(datadir)/aclocal/sdl.m4
   153 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
   154 	$(INSTALL) -m 644 sdl.pc $(DESTDIR)$(libdir)/pkgconfig
   155 
   156 uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
   157 uninstall-bin:
   158 	rm -f $(DESTDIR)$(bindir)/sdl-config
   159 uninstall-hdrs:
   160 	for file in $(HDRS); do \
   161 	    rm -f $(DESTDIR)$(includedir)/SDL/$$file; \
   162 	done
   163 	rm -f $(DESTDIR)$(includedir)/SDL/SDL_config.h
   164 	-rmdir $(DESTDIR)$(includedir)/SDL
   165 uninstall-lib:
   166 	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
   167 	rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   168 uninstall-data:
   169 	rm -f $(DESTDIR)$(datadir)/aclocal/sdl.m4
   170 	rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl.pc
   171 
   172 clean:
   173 	rm -rf $(objects)
   174 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   175 
   176 distclean: clean
   177 	rm -f Makefile include/SDL_config.h sdl-config
   178 	rm -f SDL.qpg
   179 	rm -f config.status config.cache config.log libtool
   180 	rm -rf $(srcdir)/autom4te*
   181 	find $(srcdir) \( \
   182 	    -name '*~' -o \
   183 	    -name '*.bak' -o \
   184 	    -name '*.old' -o \
   185 	    -name '*.rej' -o \
   186 	    -name '*.orig' -o \
   187 	    -name '.#*' \) \
   188 	    -exec rm -f {} \;
   189 	cp $(srcdir)/include/SDL_config.h.default $(srcdir)/include/SDL_config.h
   190 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   191 
   192 dist $(distfile):
   193 	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
   194 	tar cf - $(DIST) | (cd $(distdir); tar xf -)
   195 	cp $(distdir)/include/SDL_config.h.default $(distdir)/include/SDL_config.h
   196 	$(SHELL) $(distdir)/build-scripts/updaterev.sh
   197 	rm -rf `find $(distdir) -name .svn`
   198 	find $(distdir) \( \
   199 	    -name '*~' -o \
   200 	    -name '*.bak' -o \
   201 	    -name '*.old' -o \
   202 	    -name '*.rej' -o \
   203 	    -name '*.orig' -o \
   204 	    -name '.#*' \) \
   205 	    -exec rm -f {} \;
   206 	if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
   207 	tar cvf - $(distdir) | gzip --best >$(distfile)
   208 	rm -rf $(distdir)
   209 
   210 rpm: $(distfile)
   211 	rpmbuild -ta $?
   212 
   213 # Run indent on the source to standardize coding style
   214 indent:
   215 	@echo "Running indent... modified files:"
   216 	@cd $(srcdir) && \
   217 	find . \( \
   218 	    -name '*.h' -o \
   219 	    -name '*.c' -o \
   220 	    -name '*.cc' \) \
   221 	    -print | fgrep -v ./Xcode | \
   222 	while read file; do \
   223 	    indent "$$file" -o "$$file.indent"; \
   224 	    if cmp "$$file" "$$file.indent" >/dev/null; then \
   225 	        rm -f "$$file.indent"; \
   226 	    else \
   227 	        echo "$$file"; \
   228 	        mv -f "$$file.indent" "$$file"; \
   229 	    fi; \
   230 	done
   231 
   232 # Run indent and then commit modified files
   233 commit: indent
   234 	svn commit
   235 
   236 # Create a SVN snapshot that people can run update on
   237 snapshot:
   238 	$(SHELL) $(auxdir)/snapshot.sh