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