Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Sun, 04 Oct 2009 04:28:46 +0000
changeset 422 614c9a2f8279
parent 392 c9adf3866e87
child 423 f79b6b1367f4
permissions -rw-r--r--
Use gcc's built-in dependency generation, thanks to Adam Strzelecki
     1 # Makefile to build and install the SDL_mixer library
     2 
     3 top_builddir = .
     4 srcdir  = @srcdir@
     5 objects = build
     6 prefix = @prefix@
     7 exec_prefix = @exec_prefix@
     8 bindir	= $(DESTDIR)@bindir@
     9 libdir  = $(DESTDIR)@libdir@
    10 includedir = $(DESTDIR)@includedir@
    11 datarootdir = $(DESTDIR)@datarootdir@
    12 datadir	= @datadir@
    13 mandir	= @mandir@
    14 auxdir	= @ac_aux_dir@
    15 distpath = $(srcdir)/..
    16 distdir = SDL_mixer-@VERSION@
    17 distfile = $(distdir).tar.gz
    18 
    19 @SET_MAKE@
    20 EXE	= @EXE@
    21 SHELL	= @SHELL@
    22 CC      = @CC@
    23 CFLAGS  = @BUILD_CFLAGS@
    24 EXTRA_CFLAGS = @EXTRA_CFLAGS@
    25 LDFLAGS = @BUILD_LDFLAGS@
    26 EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
    27 LIBTOOL = @LIBTOOL@
    28 INSTALL = @INSTALL@
    29 AR	= @AR@
    30 RANLIB	= @RANLIB@
    31 WINDRES	= @WINDRES@
    32 SDL_CFLAGS = @SDL_CFLAGS@
    33 SDL_LIBS = @SDL_LIBS@
    34 
    35 TARGET  = libSDL_mixer.la
    36 OBJECTS = @OBJECTS@
    37 VERSION_OBJECTS = @VERSION_OBJECTS@
    38 PLAYWAVE_OBJECTS = @PLAYWAVE_OBJECTS@
    39 PLAYMUS_OBJECTS = @PLAYMUS_OBJECTS@
    40 
    41 DIST = CHANGES COPYING CWProjects.sea.bin MPWmake.sea.bin Makefile.in SDL_mixer.pc.in README SDL_mixer.h SDL_mixer.qpg.in SDL_mixer.spec SDL_mixer.spec.in VisualC.zip Watcom-OS2.zip Xcode.tar.gz acinclude autogen.sh build-scripts configure configure.in dynamic_mp3.c dynamic_mp3.h dynamic_ogg.c dynamic_ogg.h effect_position.c effect_stereoreverse.c effects_internal.c effects_internal.h gcc-fat.sh load_aiff.c load_aiff.h load_ogg.c load_ogg.h load_voc.c load_voc.h mikmod mixer.c music.c music_cmd.c music_cmd.h music_mad.c music_mad.h music_ogg.c music_ogg.h native_midi native_midi_gpl playmus.c playwave.c timidity wavestream.c wavestream.h version.rc
    42 
    43 LT_AGE      = @LT_AGE@
    44 LT_CURRENT  = @LT_CURRENT@
    45 LT_RELEASE  = @LT_RELEASE@
    46 LT_REVISION = @LT_REVISION@
    47 LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
    48 
    49 all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/playwave$(EXE) $(objects)/playmus$(EXE)
    50 
    51 $(srcdir)/configure: $(srcdir)/configure.in
    52 	@echo "Warning, configure.in is out of date"
    53 	#(cd $(srcdir) && sh autogen.sh && sh configure)
    54 	@sleep 3
    55 
    56 Makefile: $(srcdir)/Makefile.in
    57 	$(SHELL) config.status $@
    58 
    59 $(objects):
    60 	$(SHELL) $(auxdir)/mkinstalldirs $@
    61 
    62 .PHONY: all install install-hdrs install-lib install-bin uninstall uninstall-hdrs uninstall-lib uninstall-bin clean distclean dist
    63 
    64 -include $(OBJECTS:.lo=.d)
    65 @DEPENDS@
    66 @VERSION_DEPENDS@
    67 
    68 -include $(PLAYWAVE_OBJECTS:.lo=.d)
    69 @PLAYWAVE_DEPENDS@
    70 
    71 -include $(PLAYMUS_OBJECTS:.lo=.d)
    72 @PLAYMUS_DEPENDS@
    73 
    74 $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
    75 	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
    76 
    77 $(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET)
    78 	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
    79 
    80 $(objects)/playmus$(EXE): $(objects)/playmus.lo $(objects)/$(TARGET)
    81 	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
    82 
    83 install: all install-hdrs install-lib #install-bin
    84 install-hdrs:
    85 	$(SHELL) $(auxdir)/mkinstalldirs $(includedir)/SDL
    86 	for src in $(srcdir)/SDL_mixer.h; do \
    87 	    file=`echo $$src | sed -e 's|^.*/||'`; \
    88 	    $(INSTALL) -m 644 $$src $(includedir)/SDL/$$file; \
    89 	done
    90 	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)/pkgconfig
    91 	$(INSTALL) -m 644 SDL_mixer.pc $(libdir)/pkgconfig/
    92 install-lib: $(objects) $(objects)/$(TARGET)
    93 	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)
    94 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
    95 install-bin:
    96 	$(SHELL) $(auxdir)/mkinstalldirs $(bindir)
    97 	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playwave$(EXE) $(bindir)/playwave$(EXE)
    98 	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playmus$(EXE) $(bindir)/playmus$(EXE)
    99 
   100 uninstall: uninstall-hdrs uninstall-lib uninstall-bin
   101 uninstall-hdrs:
   102 	for src in $(srcdir)/SDL_mixer.h; do \
   103 	    file=`echo $$src | sed -e 's|^.*/||'`; \
   104 	    rm -f $(includedir)/SDL/$$file; \
   105 	done
   106 	-rmdir $(includedir)/SDL
   107 	rm -f $(libdir)/pkgconfig/SDL_mixer.pc
   108 	-rmdir $(libdir)/pkgconfig
   109 uninstall-lib:
   110 	$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
   111 uninstall-bin:
   112 	rm -f $(bindir)/playwave$(EXE)
   113 	rm -f $(bindir)/playmus$(EXE)
   114 
   115 clean:
   116 	rm -rf $(objects)
   117 
   118 distclean: clean
   119 	rm -f Makefile
   120 	rm -f SDL_mixer.qpg
   121 	rm -f config.status config.cache config.log libtool
   122 	rm -f SDL_mixer.pc
   123 	rm -rf $(srcdir)/autom4te*
   124 	find $(srcdir) \( \
   125 	    -name '*~' -o \
   126 	    -name '*.bak' -o \
   127 	    -name '*.old' -o \
   128 	    -name '*.rej' -o \
   129 	    -name '*.orig' -o \
   130 	    -name '.#*' \) \
   131 	    -exec rm -f {} \;
   132 
   133 dist $(distfile):
   134 	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
   135 	tar cf - $(DIST) | (cd $(distdir); tar xf -)
   136 	rm -rf `find $(distdir) -name .svn`
   137 	rm -f `find $(distdir) -name '.#*'`
   138 	tar cvf - $(distdir) | gzip --best >$(distfile)
   139 	rm -rf $(distdir)
   140 
   141 rpm: $(distfile)
   142 	rpmbuild -ta $?