Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Sun, 15 Jul 2007 05:33:35 +0000
changeset 357 d6d0cfdbea65
parent 355 f11a51438868
child 368 e61c4fb262bd
permissions -rw-r--r--
Fixed bug #269

David Rose - Sat Jul 14 22:16:09 PDT 2007
* Added support for MP3 playback with libmad (for GPL projects only!)
     1 # Makefile to build and install the SDL_mixer 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_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 SDL_CFLAGS = @SDL_CFLAGS@
    32 SDL_LIBS = @SDL_LIBS@
    33 
    34 TARGET  = libSDL_mixer.la
    35 SOURCES = @SOURCES@
    36 OBJECTS = @OBJECTS@
    37 
    38 DIST = CHANGES COPYING CWProjects.sea.bin MPWmake.sea.bin Makefile.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
    39 
    40 LT_AGE      = @LT_AGE@
    41 LT_CURRENT  = @LT_CURRENT@
    42 LT_RELEASE  = @LT_RELEASE@
    43 LT_REVISION = @LT_REVISION@
    44 LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
    45 
    46 all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/playwave$(EXE) $(objects)/playmus$(EXE)
    47 
    48 $(srcdir)/configure: $(srcdir)/configure.in
    49 	@echo "Warning, configure.in is out of date"
    50 	#(cd $(srcdir) && sh autogen.sh && sh configure)
    51 	@sleep 3
    52 
    53 Makefile: $(srcdir)/Makefile.in
    54 	$(SHELL) config.status $@
    55 
    56 $(objects):
    57 	$(SHELL) $(auxdir)/mkinstalldirs $@
    58 
    59 $(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET)
    60 	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
    61 
    62 $(objects)/playmus$(EXE): $(objects)/playmus.lo $(objects)/$(TARGET)
    63 	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
    64 
    65 .PHONY: all depend install install-hdrs install-lib install-bin uninstall uninstall-hdrs uninstall-lib uninstall-bin clean distclean dist
    66 depend:
    67 	@SOURCES="$(SOURCES)" INCLUDE="$(INCLUDE)" output="$(depend)" \
    68 	$(SHELL) $(auxdir)/makedep.sh
    69 	echo "\$$(objects)/playwave.lo: \$$(srcdir)/playwave.c" >>$(depend)
    70 	echo "	\$$(LIBTOOL) --mode=compile \$$(CC) \$$(CFLAGS) \$$(SDL_CFLAGS) -c \$$(srcdir)/playwave.c  -o \$$@" >>$(depend)
    71 	echo "" >>$(depend)
    72 	echo "\$$(objects)/playmus.lo: \$$(srcdir)/playmus.c" >>$(depend)
    73 	echo "	\$$(LIBTOOL) --mode=compile \$$(CC) \$$(CFLAGS) \$$(SDL_CFLAGS) -c \$$(srcdir)/playmus.c  -o \$$@" >>$(depend)
    74 	echo "" >>$(depend)
    75 
    76 include $(depend)
    77 
    78 $(objects)/$(TARGET): $(OBJECTS)
    79 	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
    80 
    81 install: all install-hdrs install-lib #install-bin
    82 install-hdrs:
    83 	$(SHELL) $(auxdir)/mkinstalldirs $(includedir)/SDL
    84 	for src in $(srcdir)/SDL_mixer.h; do \
    85 	    file=`echo $$src | sed -e 's|^.*/||'`; \
    86 	    $(INSTALL) -m 644 $$src $(includedir)/SDL/$$file; \
    87 	done
    88 install-lib: $(objects) $(objects)/$(TARGET)
    89 	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)
    90 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
    91 install-bin:
    92 	$(SHELL) $(auxdir)/mkinstalldirs $(bindir)
    93 	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playwave$(EXE) $(bindir)/playwave$(EXE)
    94 	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playmus$(EXE) $(bindir)/playmus$(EXE)
    95 
    96 uninstall: uninstall-hdrs uninstall-lib uninstall-bin
    97 uninstall-hdrs:
    98 	for src in $(srcdir)/SDL_mixer.h; do \
    99 	    file=`echo $$src | sed -e 's|^.*/||'`; \
   100 	    rm -f $(includedir)/SDL/$$file; \
   101 	done
   102 	-rmdir $(includedir)/SDL
   103 uninstall-lib:
   104 	$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
   105 uninstall-bin:
   106 	rm -f $(bindir)/playwave$(EXE)
   107 	rm -f $(bindir)/playmus$(EXE)
   108 
   109 clean:
   110 	rm -rf $(objects)
   111 
   112 distclean: clean
   113 	rm -f Makefile
   114 	rm -f SDL_mixer.qpg
   115 	rm -f config.status config.cache config.log libtool $(depend)
   116 	rm -rf $(srcdir)/autom4te*
   117 	find $(srcdir) \( \
   118 	    -name '*~' -o \
   119 	    -name '*.bak' -o \
   120 	    -name '*.old' -o \
   121 	    -name '*.rej' -o \
   122 	    -name '*.orig' -o \
   123 	    -name '.#*' \) \
   124 	    -exec rm -f {} \;
   125 
   126 dist $(distfile):
   127 	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
   128 	tar cf - $(DIST) | (cd $(distdir); tar xf -)
   129 	rm -rf `find $(distdir) -name .svn`
   130 	rm -f `find $(distdir) -name '.#*'`
   131 	tar cvf - $(distdir) | gzip --best >$(distfile)
   132 	rm -rf $(distdir)
   133 
   134 rpm: $(distfile)
   135 	rpmbuild -ta $?