Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Mon, 09 Jan 2012 21:11:11 -0500
changeset 6205 7dd8ea9f282d
parent 6159 fb6f363032fd
child 6217 6952b11b7f46
permissions -rw-r--r--
Fixed bug 1366 - SDL_opengles2.h is not installed in "include/SDL" under Linux
     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 SRC_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.in src test TODO VisualC.html VisualC VisualCE Watcom-Win32.zip WhatsNew Xcode Xcode-iOS
    40 GEN_DIST = SDL.spec
    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_hints.h \
    57 	SDL_input.h \
    58 	SDL_joystick.h \
    59 	SDL_keyboard.h \
    60 	SDL_keycode.h \
    61 	SDL_loadso.h \
    62 	SDL_log.h \
    63 	SDL_main.h \
    64 	SDL_mouse.h \
    65 	SDL_mutex.h \
    66 	SDL_name.h \
    67 	SDL_opengl.h \
    68 	SDL_opengles.h \
    69 	SDL_opengles2.h \
    70 	SDL_pixels.h \
    71 	SDL_platform.h \
    72 	SDL_power.h \
    73 	SDL_quit.h \
    74 	SDL_rect.h \
    75 	SDL_render.h \
    76 	SDL_rwops.h \
    77 	SDL_scancode.h \
    78 	SDL_shape.h \
    79 	SDL_stdinc.h \
    80 	SDL_surface.h \
    81 	SDL_syswm.h \
    82 	SDL_thread.h \
    83 	SDL_timer.h \
    84 	SDL_touch.h \
    85 	SDL_types.h \
    86 	SDL_version.h \
    87 	SDL_video.h \
    88 	begin_code.h \
    89 	close_code.h
    90 
    91 LT_AGE      = @LT_AGE@
    92 LT_CURRENT  = @LT_CURRENT@
    93 LT_RELEASE  = @LT_RELEASE@
    94 LT_REVISION = @LT_REVISION@
    95 LT_LDFLAGS  = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
    96 
    97 all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
    98 
    99 $(srcdir)/configure: $(srcdir)/configure.in
   100 	@echo "Warning, configure.in is out of date"
   101 	#(cd $(srcdir) && sh autogen.sh && sh configure)
   102 	@sleep 3
   103 
   104 Makefile: $(srcdir)/Makefile.in
   105 	$(SHELL) config.status $@
   106 
   107 Makefile.in:;
   108 
   109 $(objects):
   110 	$(SHELL) $(auxdir)/mkinstalldirs $@
   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: update-revision
   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 	if test -f include/SDL_revision.h; then \
   135 	    $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL/SDL_revision.h; \
   136 	else \
   137 	    $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL/SDL_revision.h; \
   138 	fi
   139 
   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 	rm -f $(DESTDIR)$(includedir)/SDL/SDL_revision.h
   160 	-rmdir $(DESTDIR)$(includedir)/SDL
   161 uninstall-lib:
   162 	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
   163 	rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
   164 uninstall-data:
   165 	rm -f $(DESTDIR)$(datadir)/aclocal/sdl.m4
   166 	rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl.pc
   167 
   168 clean:
   169 	rm -rf $(objects)
   170 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   171 
   172 distclean: clean
   173 	rm -f Makefile Makefile.rules sdl-config
   174 	rm -f SDL.qpg
   175 	rm -f config.status config.cache config.log libtool
   176 	rm -rf $(srcdir)/autom4te*
   177 	find $(srcdir) \( \
   178 	    -name '*~' -o \
   179 	    -name '*.bak' -o \
   180 	    -name '*.old' -o \
   181 	    -name '*.rej' -o \
   182 	    -name '*.orig' -o \
   183 	    -name '.#*' \) \
   184 	    -exec rm -f {} \;
   185 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   186 
   187 dist $(distfile):
   188 	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
   189 	(cd $(srcdir); tar cf - $(SRC_DIST)) | (cd $(distdir); tar xf -)
   190 	tar cf - $(GEN_DIST) | (cd $(distdir); tar xf -)
   191 	find $(distdir) \( \
   192 	    -name '*~' -o \
   193 	    -name '*.bak' -o \
   194 	    -name '*.old' -o \
   195 	    -name '*.rej' -o \
   196 	    -name '*.orig' -o \
   197 	    -name '.#*' \) \
   198 	    -exec rm -f {} \;
   199 	if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
   200 	tar cvf - $(distdir) | gzip --best >$(distfile)
   201 	rm -rf $(distdir)
   202 
   203 rpm: $(distfile)
   204 	rpmbuild -ta $?
   205 
   206 # Run indent on the source to standardize coding style
   207 indent:
   208 	@echo "Running indent... modified files:"
   209 	@cd $(srcdir) && \
   210 	find . \( \
   211 	    -name '*.h' -o \
   212 	    -name '*.c' -o \
   213 	    -name '*.cc' \) \
   214 	    -print | fgrep -v ./Xcode | \
   215 	while read file; do \
   216 	    indent "$$file" -o "$$file.indent"; \
   217 	    if cmp "$$file" "$$file.indent" >/dev/null; then \
   218 	        rm -f "$$file.indent"; \
   219 	    else \
   220 	        echo "$$file"; \
   221 	        mv -f "$$file.indent" "$$file"; \
   222 	    fi; \
   223 	done
   224 
   225 # Run indent and then commit modified files
   226 commit: indent
   227 	hg commit