Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Mon, 31 Jan 2011 22:44:43 -0800
changeset 5138 da10636e5eca
parent 5066 3afb71c202b2
child 5145 2f44e6969a59
permissions -rw-r--r--
Making the API simpler, scaling is always defined as linear interpolation and should be supported as much as possible on all renderers.
     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_scancode.h \
    75 	SDL_shape.h \
    76 	SDL_stdinc.h \
    77 	SDL_surface.h \
    78 	SDL_syswm.h \
    79 	SDL_thread.h \
    80 	SDL_timer.h \
    81 	SDL_touch.h \
    82 	SDL_types.h \
    83 	SDL_version.h \
    84 	SDL_video.h \
    85 	begin_code.h \
    86 	close_code.h
    87 
    88 LT_AGE      = @LT_AGE@
    89 LT_CURRENT  = @LT_CURRENT@
    90 LT_RELEASE  = @LT_RELEASE@
    91 LT_REVISION = @LT_REVISION@
    92 LT_LDFLAGS  = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
    93 
    94 all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
    95 
    96 $(srcdir)/configure: $(srcdir)/configure.in
    97 	@echo "Warning, configure.in is out of date"
    98 	#(cd $(srcdir) && sh autogen.sh && sh configure)
    99 	@sleep 3
   100 
   101 Makefile: $(srcdir)/Makefile.in
   102 	$(SHELL) config.status $@
   103 
   104 Makefile.in:;
   105 
   106 $(objects):
   107 	$(SHELL) $(auxdir)/mkinstalldirs $@
   108 
   109 # To make sure parallel builds will not fail
   110 $(srcdir)/include/SDL_revision.h: update-revision
   111 
   112 update-revision:
   113 	$(SHELL) $(auxdir)/updaterev.sh
   114 
   115 .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)
   116 
   117 $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
   118 	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
   119 
   120 $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
   121 	$(AR) cru $@ $(SDLMAIN_OBJECTS)
   122 	$(RANLIB) $@
   123 
   124 install: all install-bin install-hdrs install-lib install-data
   125 install-bin:
   126 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
   127 	$(INSTALL) -m 755 sdl-config $(DESTDIR)$(bindir)/sdl-config
   128 install-hdrs:
   129 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL
   130 	for file in $(HDRS); do \
   131 	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL/$$file; \
   132 	done
   133 	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL/SDL_config.h
   134 install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
   135 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
   136 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
   137 	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   138 	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   139 install-data:
   140 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
   141 	$(INSTALL) -m 644 $(srcdir)/sdl.m4 $(DESTDIR)$(datadir)/aclocal/sdl.m4
   142 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
   143 	$(INSTALL) -m 644 sdl.pc $(DESTDIR)$(libdir)/pkgconfig
   144 
   145 uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
   146 uninstall-bin:
   147 	rm -f $(DESTDIR)$(bindir)/sdl-config
   148 uninstall-hdrs:
   149 	for file in $(HDRS); do \
   150 	    rm -f $(DESTDIR)$(includedir)/SDL/$$file; \
   151 	done
   152 	rm -f $(DESTDIR)$(includedir)/SDL/SDL_config.h
   153 	-rmdir $(DESTDIR)$(includedir)/SDL
   154 uninstall-lib:
   155 	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
   156 	rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   157 uninstall-data:
   158 	rm -f $(DESTDIR)$(datadir)/aclocal/sdl.m4
   159 	rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl.pc
   160 
   161 clean:
   162 	rm -rf $(objects)
   163 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   164 
   165 distclean: clean
   166 	rm -f Makefile include/SDL_config.h sdl-config
   167 	rm -f SDL.qpg
   168 	rm -f config.status config.cache config.log libtool
   169 	rm -rf $(srcdir)/autom4te*
   170 	find $(srcdir) \( \
   171 	    -name '*~' -o \
   172 	    -name '*.bak' -o \
   173 	    -name '*.old' -o \
   174 	    -name '*.rej' -o \
   175 	    -name '*.orig' -o \
   176 	    -name '.#*' \) \
   177 	    -exec rm -f {} \;
   178 	cp $(srcdir)/include/SDL_config.h.default $(srcdir)/include/SDL_config.h
   179 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   180 
   181 dist $(distfile):
   182 	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
   183 	tar cf - $(DIST) | (cd $(distdir); tar xf -)
   184 	cp $(distdir)/include/SDL_config.h.default $(distdir)/include/SDL_config.h
   185 	$(SHELL) $(distdir)/build-scripts/updaterev.sh
   186 	rm -rf `find $(distdir) -name .svn`
   187 	find $(distdir) \( \
   188 	    -name '*~' -o \
   189 	    -name '*.bak' -o \
   190 	    -name '*.old' -o \
   191 	    -name '*.rej' -o \
   192 	    -name '*.orig' -o \
   193 	    -name '.#*' \) \
   194 	    -exec rm -f {} \;
   195 	if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
   196 	tar cvf - $(distdir) | gzip --best >$(distfile)
   197 	rm -rf $(distdir)
   198 
   199 rpm: $(distfile)
   200 	rpmbuild -ta $?
   201 
   202 # Run indent on the source to standardize coding style
   203 indent:
   204 	@echo "Running indent... modified files:"
   205 	@cd $(srcdir) && \
   206 	find . \( \
   207 	    -name '*.h' -o \
   208 	    -name '*.c' -o \
   209 	    -name '*.cc' \) \
   210 	    -print | fgrep -v ./Xcode | \
   211 	while read file; do \
   212 	    indent "$$file" -o "$$file.indent"; \
   213 	    if cmp "$$file" "$$file.indent" >/dev/null; then \
   214 	        rm -f "$$file.indent"; \
   215 	    else \
   216 	        echo "$$file"; \
   217 	        mv -f "$$file.indent" "$$file"; \
   218 	    fi; \
   219 	done
   220 
   221 # Run indent and then commit modified files
   222 commit: indent
   223 	svn commit
   224 
   225 # Create a SVN snapshot that people can run update on
   226 snapshot:
   227 	$(SHELL) $(auxdir)/snapshot.sh