Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Wed, 07 Oct 2009 14:29:59 +0000
changeset 3352 6dc250ebdd80
parent 3344 b2abf7a772fc
child 3355 3c9e6f2f3c58
permissions -rw-r--r--
The SDL 1.3 documentation will be primarily online wiki based:
http://wiki.libsdl.org/

Please contact Lauren MacDonell laleh_aziz cox.net who is coordinating it.
     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 docs docs.html 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
    46 
    47 HDRS = SDL.h SDL_atomic.h SDL_audio.h SDL_compat.h SDL_cpuinfo.h SDL_endian.h SDL_error.h SDL_events.h SDL_haptic.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_stdinc.h SDL_surface.h SDL_syswm.h SDL_thread.h SDL_timer.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 $(objects):
    66 	$(SHELL) $(auxdir)/mkinstalldirs $@
    67 
    68 # To make sure parallel builds will not fail
    69 $(srcdir)/include/SDL_revision.h: update-revision
    70 
    71 update-revision:
    72 	$(SHELL) $(auxdir)/updaterev.sh
    73 
    74 .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
    75 
    76 -include $(OBJECTS:.lo=.d)
    77 @DEPENDS@
    78 @VERSION_DEPENDS@
    79 @SDLMAIN_DEPENDS@
    80 
    81 $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
    82 	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
    83 
    84 $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
    85 	$(AR) cru $@ $(SDLMAIN_OBJECTS)
    86 	$(RANLIB) $@
    87 
    88 install: all install-bin install-hdrs install-lib install-data
    89 install-bin:
    90 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
    91 	$(INSTALL) -m 755 sdl-config $(DESTDIR)$(bindir)/sdl-config
    92 install-hdrs:
    93 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL
    94 	for file in $(HDRS); do \
    95 	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL/$$file; \
    96 	done
    97 	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL/SDL_config.h
    98 install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
    99 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
   100 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
   101 	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   102 	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   103 install-data:
   104 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
   105 	$(INSTALL) -m 644 $(srcdir)/sdl.m4 $(DESTDIR)$(datadir)/aclocal/sdl.m4
   106 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
   107 	$(INSTALL) -m 644 sdl.pc $(DESTDIR)$(libdir)/pkgconfig
   108 
   109 uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
   110 uninstall-bin:
   111 	rm -f $(DESTDIR)$(bindir)/sdl-config
   112 uninstall-hdrs:
   113 	for file in $(HDRS); do \
   114 	    rm -f $(DESTDIR)$(includedir)/SDL/$$file; \
   115 	done
   116 	rm -f $(DESTDIR)$(includedir)/SDL/SDL_config.h
   117 	-rmdir $(DESTDIR)$(includedir)/SDL
   118 uninstall-lib:
   119 	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
   120 	rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   121 uninstall-data:
   122 	rm -f $(DESTDIR)$(datadir)/aclocal/sdl.m4
   123 
   124 clean:
   125 	rm -rf $(objects)
   126 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   127 
   128 distclean: clean
   129 	rm -f Makefile include/SDL_config.h sdl-config
   130 	rm -f SDL.qpg
   131 	rm -f config.status config.cache config.log libtool
   132 	rm -rf $(srcdir)/autom4te*
   133 	find $(srcdir) \( \
   134 	    -name '*~' -o \
   135 	    -name '*.bak' -o \
   136 	    -name '*.old' -o \
   137 	    -name '*.rej' -o \
   138 	    -name '*.orig' -o \
   139 	    -name '.#*' \) \
   140 	    -exec rm -f {} \;
   141 	cp $(srcdir)/include/SDL_config.h.default $(srcdir)/include/SDL_config.h
   142 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   143 
   144 dist $(distfile):
   145 	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
   146 	tar cf - $(DIST) | (cd $(distdir); tar xf -)
   147 	cp $(distdir)/include/SDL_config.h.default $(distdir)/include/SDL_config.h
   148 	$(SHELL) $(distdir)/build-scripts/updaterev.sh
   149 	rm -rf `find $(distdir) -name .svn`
   150 	find $(distdir) \( \
   151 	    -name '*~' -o \
   152 	    -name '*.bak' -o \
   153 	    -name '*.old' -o \
   154 	    -name '*.rej' -o \
   155 	    -name '*.orig' -o \
   156 	    -name '.#*' \) \
   157 	    -exec rm -f {} \;
   158 	if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
   159 	tar cvf - $(distdir) | gzip --best >$(distfile)
   160 	rm -rf $(distdir)
   161 
   162 rpm: $(distfile)
   163 	rpmbuild -ta $?
   164 
   165 # Run indent on the source to standardize coding style
   166 indent:
   167 	@echo "Running indent... modified files:"
   168 	@cd $(srcdir) && \
   169 	find . \( \
   170 	    -name '*.h' -o \
   171 	    -name '*.c' -o \
   172 	    -name '*.cc' \) \
   173 	    -print | fgrep -v ./Xcode | \
   174 	while read file; do \
   175 	    indent "$$file" -o "$$file.indent"; \
   176 	    if cmp "$$file" "$$file.indent" >/dev/null; then \
   177 	        rm -f "$$file.indent"; \
   178 	    else \
   179 	        echo "$$file"; \
   180 	        mv -f "$$file.indent" "$$file"; \
   181 	    fi; \
   182 	done
   183 
   184 # Run indent and then commit modified files
   185 commit: indent
   186 	svn commit
   187 
   188 # Create a SVN snapshot that people can run update on
   189 snapshot:
   190 	$(SHELL) $(auxdir)/snapshot.sh