Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Mon, 20 Feb 2006 20:08:29 +0000
changeset 1393 cd3362657144
parent 1391 7dc446173e37
child 1394 e57f8d1344b6
permissions -rw-r--r--
Pass LDFLAGS to the build system
     1 # Makefile to build and install the SDL library
     2 
     3 top_builddir = .
     4 srcdir  = @srcdir@
     5 objects = build
     6 depend	= build-deps
     7 prefix = @prefix@
     8 exec_prefix = @exec_prefix@
     9 bindir	= $(DESTDIR)@bindir@
    10 libdir  = $(DESTDIR)@libdir@
    11 includedir = $(DESTDIR)@includedir@
    12 datadir	= $(DESTDIR)@datadir@
    13 mandir	= $(DESTDIR)@mandir@
    14 auxdir	= @ac_aux_dir@
    15 distpath = $(srcdir)/..
    16 distdir = SDL-@SDL_VERSION@
    17 distfile = $(distdir).tar.gz
    18 
    19 @SET_MAKE@
    20 SHELL	= @SHELL@
    21 CC      = @CC@
    22 INCLUDE = @INCLUDE@
    23 CFLAGS  = @BUILD_CFLAGS@
    24 LDFLAGS = @BUILD_LDFLAGS@
    25 LIBTOOL = @LIBTOOL@
    26 INSTALL = @INSTALL@
    27 NASM	= @NASM@ @NASMFLAGS@
    28 
    29 TARGET  = libSDL.la
    30 SOURCES = @SOURCES@
    31 OBJECTS = @OBJECTS@
    32 
    33 DIST = acinclude.m4 autogen.sh Borland.html Borland.zip BUGS build-scripts configure configure.in COPYING CREDITS CWprojects.sea.bin docs docs.html EpocBuildFiles.zip include INSTALL Makefile.dc Makefile.in MPWmake.sea.bin PBProjects.tar.gz README* sdl-config.in sdl.m4 SDL.qpg.in SDL.spec SDL.spec.in setvars.cmd src test TODO VisualCE.zip VisualC.html VisualC.zip Watcom.mif WhatsNew Xcode21.tar.gz Xcode.tar.gz XcodeUniversal.tar.gz
    34 
    35 LT_AGE      = @LT_AGE@
    36 LT_CURRENT  = @LT_CURRENT@
    37 LT_RELEASE  = @LT_RELEASE@
    38 LT_REVISION = @LT_REVISION@
    39 LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
    40 
    41 all: Makefile $(objects) $(objects)/$(TARGET)
    42 
    43 Makefile: $(srcdir)/Makefile.in
    44 	$(SHELL) config.status $@
    45 
    46 $(objects):
    47 	$(SHELL) $(auxdir)/mkinstalldirs $@
    48 
    49 .PHONY: all depend install install-bin install-hdrs install-lib install-data install-man uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-man clean distclean dist
    50 depend:
    51 	SOURCES="$(SOURCES)" INCLUDE="$(INCLUDE)" objects="$(objects)" output="$(depend)" \
    52 	$(SHELL) $(auxdir)/makedep.sh
    53 
    54 include $(depend)
    55 
    56 $(objects)/$(TARGET): $(OBJECTS)
    57 	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBS) $(LT_LDFLAGS)
    58 
    59 install: install-bin install-hdrs install-lib install-data install-man
    60 install-bin:
    61 	$(SHELL) $(auxdir)/mkinstalldirs $(bindir)
    62 	$(INSTALL) -m 755 $(srcdir)/sdl-config $(bindir)/sdl-config
    63 install-hdrs:
    64 	$(SHELL) $(auxdir)/mkinstalldirs $(includedir)/SDL
    65 	for src in $(srcdir)/include/*.h; do \
    66 	    file=`echo $$src | sed -e 's|^.*/||'`; \
    67 	    $(INSTALL) $$src $(includedir)/SDL/$$file; \
    68 	done
    69 	$(INSTALL) include/SDL_config.h $(includedir)/SDL/SDL_config.h
    70 install-lib:
    71 	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)
    72 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
    73 install-data:
    74 	$(SHELL) $(auxdir)/mkinstalldirs $(datadir)/aclocal
    75 	$(INSTALL) $(srcdir)/sdl.m4 $(datadir)/aclocal/sdl.m4
    76 install-man:
    77 	$(SHELL) $(auxdir)/mkinstalldirs $(mandir)/man3
    78 	for src in $(srcdir)/docs/man3/*.3; do \
    79 	    file=`echo $$src | sed -e 's|^.*/||'`; \
    80 	    $(INSTALL) $$src $(mandir)/man3/$$file; \
    81 	done
    82 
    83 uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-man
    84 uninstall-bin:
    85 	rm -f $(bindir)/sdl-config
    86 uninstall-hdrs:
    87 	for src in $(srcdir)/include/*.h; do \
    88 	    file=`echo $$src | sed -e 's|^.*/||'`; \
    89 	    rm -f $(includedir)/SDL/$$file; \
    90 	done
    91 	rm -f $(includedir)/SDL/SDL_config.h
    92 uninstall-lib:
    93 	$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
    94 uninstall-data:
    95 	rm -f $(datadir)/aclocal/sdl.m4
    96 uninstall-man:
    97 	for src in $(srcdir)/docs/man3/*.3; do \
    98 	    file=`echo $$src | sed -e 's|^.*/||'`; \
    99 	    rm -f $(mandir)/man3/$$file; \
   100 	done
   101 
   102 clean:
   103 	rm -rf $(objects)
   104 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   105 
   106 distclean: clean
   107 	rm -f Makefile include/SDL_config.h sdl-config
   108 	rm -f SDL.qpg
   109 	rm -f config.status config.cache config.log libtool $(depend)
   110 	rm -rf $(srcdir)/autom4te*
   111 	find $(srcdir) \
   112 	    -name '*~' -o -name '*.bak' -o -name '*.old' -o -name '*.rej' -o \
   113 	    -name '.#*' \
   114 	    -exec rm -f {} \;
   115 	cp include/SDL_config.h.minimal include/SDL_config.h
   116 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
   117 
   118 dist $(distfile):
   119 	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
   120 	tar cf - $(DIST) | (cd $(distdir); tar xf -)
   121 	rm -rf `find $(distdir) -name CVS`
   122 	rm -f `find $(distdir) -name '.cvsignore'`
   123 	rm -f `find $(distdir) -name '.#*'`
   124 	tar cvf - $(distdir) | gzip --best >$(distfile)
   125 	rm -rf $(distdir)
   126 
   127 rpm: $(distfile)
   128 	rpmbuild -ta $?