Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Thu, 24 Feb 2011 09:41:04 -0800
changeset 5393 17da19f8ca05
parent 5346 437e54382293
child 5498 ef1db08c40ac
permissions -rw-r--r--
SDL 1.3 doesn't use nasm anymore. :)
     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 AR	= @AR@
    29 RANLIB	= @RANLIB@
    30 WINDRES	= @WINDRES@
    31 
    32 TARGET  = libSDL.la
    33 OBJECTS = @OBJECTS@
    34 VERSION_OBJECTS = @VERSION_OBJECTS@
    35 
    36 SDLMAIN_TARGET = libSDLmain.a
    37 SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
    38 
    39 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
    40 
    41 HDRS = \
    42 	SDL.h \
    43 	SDL_assert.h \
    44 	SDL_atomic.h \
    45 	SDL_audio.h \
    46 	SDL_blendmode.h \
    47 	SDL_clipboard.h \
    48 	SDL_compat.h \
    49 	SDL_cpuinfo.h \
    50 	SDL_endian.h \
    51 	SDL_error.h \
    52 	SDL_events.h \
    53 	SDL_gesture.h \
    54 	SDL_haptic.h \
    55 	SDL_hints.h \
    56 	SDL_input.h \
    57 	SDL_joystick.h \
    58 	SDL_keyboard.h \
    59 	SDL_keycode.h \
    60 	SDL_loadso.h \
    61 	SDL_log.h \
    62 	SDL_main.h \
    63 	SDL_mouse.h \
    64 	SDL_mutex.h \
    65 	SDL_name.h \
    66 	SDL_opengl.h \
    67 	SDL_opengles.h \
    68 	SDL_pixels.h \
    69 	SDL_platform.h \
    70 	SDL_power.h \
    71 	SDL_quit.h \
    72 	SDL_rect.h \
    73 	SDL_render.h \
    74 	SDL_rwops.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 update-revision:
   111 	$(SHELL) $(auxdir)/updaterev.sh
   112 
   113 .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)
   114 
   115 $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
   116 	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
   117 
   118 $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
   119 	$(AR) cru $@ $(SDLMAIN_OBJECTS)
   120 	$(RANLIB) $@
   121 
   122 install: all install-bin install-hdrs install-lib install-data
   123 install-bin:
   124 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
   125 	$(INSTALL) -m 755 sdl-config $(DESTDIR)$(bindir)/sdl-config
   126 install-hdrs: update-revision
   127 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL
   128 	for file in $(HDRS); do \
   129 	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL/$$file; \
   130 	done
   131 	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL/SDL_config.h
   132 	if test -f include/SDL_revision.h; then \
   133 	    $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL/SDL_revision.h; \
   134 	else \
   135 	    $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL/SDL_revision.h; \
   136 	fi
   137 
   138 install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
   139 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
   140 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
   141 	$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   142 	$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   143 install-data:
   144 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
   145 	$(INSTALL) -m 644 $(srcdir)/sdl.m4 $(DESTDIR)$(datadir)/aclocal/sdl.m4
   146 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
   147 	$(INSTALL) -m 644 sdl.pc $(DESTDIR)$(libdir)/pkgconfig
   148 
   149 uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
   150 uninstall-bin:
   151 	rm -f $(DESTDIR)$(bindir)/sdl-config
   152 uninstall-hdrs:
   153 	for file in $(HDRS); do \
   154 	    rm -f $(DESTDIR)$(includedir)/SDL/$$file; \
   155 	done
   156 	rm -f $(DESTDIR)$(includedir)/SDL/SDL_config.h
   157 	rm -f $(DESTDIR)$(includedir)/SDL/SDL_revision.h
   158 	-rmdir $(DESTDIR)$(includedir)/SDL
   159 uninstall-lib:
   160 	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
   161 	rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   162 uninstall-data:
   163 	rm -f $(DESTDIR)$(datadir)/aclocal/sdl.m4
   164 	rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl.pc
   165 
   166 clean:
   167 	rm -rf $(objects)
   168 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   169 
   170 distclean: clean
   171 	rm -f Makefile Makefile.rules sdl-config
   172 	rm -f SDL.qpg
   173 	rm -f config.status config.cache config.log libtool
   174 	rm -rf $(srcdir)/autom4te*
   175 	find $(srcdir) \( \
   176 	    -name '*~' -o \
   177 	    -name '*.bak' -o \
   178 	    -name '*.old' -o \
   179 	    -name '*.rej' -o \
   180 	    -name '*.orig' -o \
   181 	    -name '.#*' \) \
   182 	    -exec rm -f {} \;
   183 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   184 
   185 dist $(distfile):
   186 	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
   187 	tar cf - $(DIST) | (cd $(distdir); tar xf -)
   188 	find $(distdir) \( \
   189 	    -name '*~' -o \
   190 	    -name '*.bak' -o \
   191 	    -name '*.old' -o \
   192 	    -name '*.rej' -o \
   193 	    -name '*.orig' -o \
   194 	    -name '.#*' \) \
   195 	    -exec rm -f {} \;
   196 	if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
   197 	tar cvf - $(distdir) | gzip --best >$(distfile)
   198 	rm -rf $(distdir)
   199 
   200 rpm: $(distfile)
   201 	rpmbuild -ta $?
   202 
   203 # Run indent on the source to standardize coding style
   204 indent:
   205 	@echo "Running indent... modified files:"
   206 	@cd $(srcdir) && \
   207 	find . \( \
   208 	    -name '*.h' -o \
   209 	    -name '*.c' -o \
   210 	    -name '*.cc' \) \
   211 	    -print | fgrep -v ./Xcode | \
   212 	while read file; do \
   213 	    indent "$$file" -o "$$file.indent"; \
   214 	    if cmp "$$file" "$$file.indent" >/dev/null; then \
   215 	        rm -f "$$file.indent"; \
   216 	    else \
   217 	        echo "$$file"; \
   218 	        mv -f "$$file.indent" "$$file"; \
   219 	    fi; \
   220 	done
   221 
   222 # Run indent and then commit modified files
   223 commit: indent
   224 	hg commit