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