Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Sat, 03 Oct 2009 20:43:33 +0000
changeset 419 e27fe0bfe470
parent 392 c9adf3866e87
child 422 614c9a2f8279
permissions -rw-r--r--
Sam Lantinga - Sat Oct 3 13:33:36 PDT 2009
* MOD support uses libmikmod and is dynamically loaded by default
     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 WINDRES	= @WINDRES@
    32 SDL_CFLAGS = @SDL_CFLAGS@
    33 SDL_LIBS = @SDL_LIBS@
    34 
    35 TARGET  = libSDL_mixer.la
    36 SOURCES = @SOURCES@
    37 OBJECTS = @OBJECTS@
    38 
    39 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
    40 
    41 LT_AGE      = @LT_AGE@
    42 LT_CURRENT  = @LT_CURRENT@
    43 LT_RELEASE  = @LT_RELEASE@
    44 LT_REVISION = @LT_REVISION@
    45 LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
    46 
    47 all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/playwave$(EXE) $(objects)/playmus$(EXE)
    48 
    49 $(srcdir)/configure: $(srcdir)/configure.in
    50 	@echo "Warning, configure.in is out of date"
    51 	#(cd $(srcdir) && sh autogen.sh && sh configure)
    52 	@sleep 3
    53 
    54 Makefile: $(srcdir)/Makefile.in
    55 	$(SHELL) config.status $@
    56 
    57 $(objects):
    58 	$(SHELL) $(auxdir)/mkinstalldirs $@
    59 
    60 $(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET)
    61 	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
    62 
    63 $(objects)/playmus$(EXE): $(objects)/playmus.lo $(objects)/$(TARGET)
    64 	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
    65 
    66 .PHONY: all depend install install-hdrs install-lib install-bin uninstall uninstall-hdrs uninstall-lib uninstall-bin clean distclean dist
    67 depend:
    68 	@SOURCES="$(SOURCES)" INCLUDE="$(INCLUDE)" output="$(depend)" \
    69 	$(SHELL) $(auxdir)/makedep.sh
    70 	echo "\$$(objects)/playwave.lo: \$$(srcdir)/playwave.c" >>$(depend)
    71 	echo "	\$$(LIBTOOL) --mode=compile \$$(CC) \$$(CFLAGS) \$$(SDL_CFLAGS) -c \$$(srcdir)/playwave.c  -o \$$@" >>$(depend)
    72 	echo "" >>$(depend)
    73 	echo "\$$(objects)/playmus.lo: \$$(srcdir)/playmus.c" >>$(depend)
    74 	echo "	\$$(LIBTOOL) --mode=compile \$$(CC) \$$(CFLAGS) \$$(SDL_CFLAGS) -c \$$(srcdir)/playmus.c  -o \$$@" >>$(depend)
    75 	echo "" >>$(depend)
    76 
    77 include $(depend)
    78 
    79 $(objects)/$(TARGET): $(OBJECTS)
    80 	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
    81 
    82 install: all install-hdrs install-lib #install-bin
    83 install-hdrs:
    84 	$(SHELL) $(auxdir)/mkinstalldirs $(includedir)/SDL
    85 	for src in $(srcdir)/SDL_mixer.h; do \
    86 	    file=`echo $$src | sed -e 's|^.*/||'`; \
    87 	    $(INSTALL) -m 644 $$src $(includedir)/SDL/$$file; \
    88 	done
    89 	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)/pkgconfig
    90 	$(INSTALL) -m 644 SDL_mixer.pc $(libdir)/pkgconfig/
    91 install-lib: $(objects) $(objects)/$(TARGET)
    92 	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)
    93 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
    94 install-bin:
    95 	$(SHELL) $(auxdir)/mkinstalldirs $(bindir)
    96 	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playwave$(EXE) $(bindir)/playwave$(EXE)
    97 	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playmus$(EXE) $(bindir)/playmus$(EXE)
    98 
    99 uninstall: uninstall-hdrs uninstall-lib uninstall-bin
   100 uninstall-hdrs:
   101 	for src in $(srcdir)/SDL_mixer.h; do \
   102 	    file=`echo $$src | sed -e 's|^.*/||'`; \
   103 	    rm -f $(includedir)/SDL/$$file; \
   104 	done
   105 	-rmdir $(includedir)/SDL
   106 	rm -f $(libdir)/pkgconfig/SDL_mixer.pc
   107 	-rmdir $(libdir)/pkgconfig
   108 uninstall-lib:
   109 	$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
   110 uninstall-bin:
   111 	rm -f $(bindir)/playwave$(EXE)
   112 	rm -f $(bindir)/playmus$(EXE)
   113 
   114 clean:
   115 	rm -rf $(objects)
   116 
   117 distclean: clean
   118 	rm -f Makefile
   119 	rm -f SDL_mixer.qpg
   120 	rm -f config.status config.cache config.log libtool $(depend)
   121 	rm -f SDL_mixer.pc
   122 	rm -rf $(srcdir)/autom4te*
   123 	find $(srcdir) \( \
   124 	    -name '*~' -o \
   125 	    -name '*.bak' -o \
   126 	    -name '*.old' -o \
   127 	    -name '*.rej' -o \
   128 	    -name '*.orig' -o \
   129 	    -name '.#*' \) \
   130 	    -exec rm -f {} \;
   131 
   132 dist $(distfile):
   133 	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
   134 	tar cf - $(DIST) | (cd $(distdir); tar xf -)
   135 	rm -rf `find $(distdir) -name .svn`
   136 	rm -f `find $(distdir) -name '.#*'`
   137 	tar cvf - $(distdir) | gzip --best >$(distfile)
   138 	rm -rf $(distdir)
   139 
   140 rpm: $(distfile)
   141 	rpmbuild -ta $?