Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Tue, 17 Oct 2017 02:33:47 -0700
changeset 777 92882ef2ab81
parent 719 d9b3684ca715
child 778 05c93f7af403
permissions -rw-r--r--
Rewrote music.c to support any number of decode libraries using a compiled-in plugin interface
Mix_LoadWAV_RW() can now load sound formats that were previously available only as music.

This is still work in progress. Testing and project updates need to happen on other platforms.
slouken@302
     1
# Makefile to build and install the SDL_mixer library
slouken@302
     2
slouken@302
     3
top_builddir = .
slouken@302
     4
srcdir  = @srcdir@
slouken@302
     5
objects = build
slouken@302
     6
prefix = @prefix@
slouken@302
     7
exec_prefix = @exec_prefix@
slouken@302
     8
bindir	= $(DESTDIR)@bindir@
slouken@302
     9
libdir  = $(DESTDIR)@libdir@
slouken@302
    10
includedir = $(DESTDIR)@includedir@
slouken@422
    11
datarootdir = $(DESTDIR)@datarootdir@
slouken@422
    12
datadir	= @datadir@
slouken@422
    13
mandir	= @mandir@
slouken@302
    14
auxdir	= @ac_aux_dir@
slouken@302
    15
distpath = $(srcdir)/..
slouken@578
    16
distdir = SDL2_mixer-@VERSION@
slouken@302
    17
distfile = $(distdir).tar.gz
slouken@302
    18
slouken@302
    19
@SET_MAKE@
slouken@302
    20
EXE	= @EXE@
slouken@302
    21
SHELL	= @SHELL@
slouken@302
    22
CC      = @CC@
slouken@494
    23
CXX     = g++
slouken@302
    24
CFLAGS  = @BUILD_CFLAGS@
slouken@302
    25
EXTRA_CFLAGS = @EXTRA_CFLAGS@
slouken@302
    26
LDFLAGS = @BUILD_LDFLAGS@
slouken@302
    27
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
slouken@302
    28
LIBTOOL = @LIBTOOL@
slouken@302
    29
INSTALL = @INSTALL@
slouken@302
    30
AR	= @AR@
slouken@302
    31
RANLIB	= @RANLIB@
slouken@368
    32
WINDRES	= @WINDRES@
slouken@302
    33
SDL_CFLAGS = @SDL_CFLAGS@
slouken@302
    34
SDL_LIBS = @SDL_LIBS@
slouken@302
    35
slouken@578
    36
TARGET  = libSDL2_mixer.la
slouken@302
    37
OBJECTS = @OBJECTS@
slouken@422
    38
VERSION_OBJECTS = @VERSION_OBJECTS@
slouken@422
    39
PLAYWAVE_OBJECTS = @PLAYWAVE_OBJECTS@
slouken@422
    40
PLAYMUS_OBJECTS = @PLAYMUS_OBJECTS@
slouken@302
    41
slouken@777
    42
DIST = *.txt Android.mk Makefile.in SDL2_mixer.pc.in SDL_mixer.h SDL2_mixer.spec SDL2_mixer.spec.in debian VisualC Xcode Xcode-iOS acinclude autogen.sh build-scripts configure configure.in dynamic_flac.c dynamic_flac.h dynamic_fluidsynth.c dynamic_fluidsynth.h dynamic_modplug.c dynamic_modplug.h dynamic_mikmod.c dynamic_mikmod.h dynamic_smpeg.c dynamic_smpeg.h dynamic_ogg.c dynamic_ogg.h effect_position.c effect_stereoreverse.c effects_internal.c effects_internal.h fluidsynth.c fluidsynth.h external gcc-fat.sh load_aiff.c load_aiff.h load_flac.c load_flac.h load_mp3.c load_mp3.h load_ogg.c load_ogg.h load_voc.c load_voc.h mixer.c mixer.h music.c music_cmd.c music_cmd.h music_flac.c music_flac.h music_mad.c music_mad.h music_mikmod.c music_mikmod.h music_modplug.c music_modplug.h music_ogg.c music_ogg.h native_midi playmus.c playwave.c timidity wavestream.c wavestream.h version.rc
slouken@302
    43
slouken@302
    44
LT_AGE      = @LT_AGE@
slouken@302
    45
LT_CURRENT  = @LT_CURRENT@
slouken@302
    46
LT_RELEASE  = @LT_RELEASE@
slouken@302
    47
LT_REVISION = @LT_REVISION@
slouken@302
    48
LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
slouken@302
    49
slouken@302
    50
all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/playwave$(EXE) $(objects)/playmus$(EXE)
slouken@302
    51
slouken@302
    52
$(srcdir)/configure: $(srcdir)/configure.in
slouken@302
    53
	@echo "Warning, configure.in is out of date"
slouken@302
    54
	#(cd $(srcdir) && sh autogen.sh && sh configure)
slouken@302
    55
	@sleep 3
slouken@302
    56
slouken@302
    57
Makefile: $(srcdir)/Makefile.in
slouken@302
    58
	$(SHELL) config.status $@
slouken@302
    59
slouken@302
    60
$(objects):
slouken@302
    61
	$(SHELL) $(auxdir)/mkinstalldirs $@
slouken@302
    62
slouken@422
    63
.PHONY: all install install-hdrs install-lib install-bin uninstall uninstall-hdrs uninstall-lib uninstall-bin clean distclean dist
slouken@422
    64
slouken@422
    65
$(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
slouken@422
    66
	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
slouken@422
    67
slouken@302
    68
$(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET)
slouken@571
    69
	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(LDFLAGS) $(objects)/$(TARGET)
slouken@302
    70
slouken@302
    71
$(objects)/playmus$(EXE): $(objects)/playmus.lo $(objects)/$(TARGET)
slouken@571
    72
	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(LDFLAGS) $(objects)/$(TARGET)
slouken@302
    73
slouken@306
    74
install: all install-hdrs install-lib #install-bin
slouken@302
    75
install-hdrs:
slouken@578
    76
	$(SHELL) $(auxdir)/mkinstalldirs $(includedir)/SDL2
slouken@302
    77
	for src in $(srcdir)/SDL_mixer.h; do \
slouken@302
    78
	    file=`echo $$src | sed -e 's|^.*/||'`; \
slouken@578
    79
	    $(INSTALL) -m 644 $$src $(includedir)/SDL2/$$file; \
slouken@302
    80
	done
slouken@392
    81
	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)/pkgconfig
slouken@578
    82
	$(INSTALL) -m 644 SDL2_mixer.pc $(libdir)/pkgconfig/
slouken@355
    83
install-lib: $(objects) $(objects)/$(TARGET)
slouken@302
    84
	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)
slouken@302
    85
	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
slouken@302
    86
install-bin:
slouken@302
    87
	$(SHELL) $(auxdir)/mkinstalldirs $(bindir)
slouken@302
    88
	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playwave$(EXE) $(bindir)/playwave$(EXE)
slouken@302
    89
	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playmus$(EXE) $(bindir)/playmus$(EXE)
slouken@302
    90
slouken@302
    91
uninstall: uninstall-hdrs uninstall-lib uninstall-bin
slouken@302
    92
uninstall-hdrs:
slouken@302
    93
	for src in $(srcdir)/SDL_mixer.h; do \
slouken@302
    94
	    file=`echo $$src | sed -e 's|^.*/||'`; \
slouken@578
    95
	    rm -f $(includedir)/SDL2/$$file; \
slouken@302
    96
	done
slouken@578
    97
	-rmdir $(includedir)/SDL2
slouken@578
    98
	rm -f $(libdir)/pkgconfig/SDL2_mixer.pc
slouken@392
    99
	-rmdir $(libdir)/pkgconfig
slouken@302
   100
uninstall-lib:
slouken@302
   101
	$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
slouken@302
   102
uninstall-bin:
slouken@302
   103
	rm -f $(bindir)/playwave$(EXE)
slouken@302
   104
	rm -f $(bindir)/playmus$(EXE)
slouken@302
   105
slouken@302
   106
clean:
slouken@302
   107
	rm -rf $(objects)
slouken@302
   108
slouken@302
   109
distclean: clean
slouken@302
   110
	rm -f Makefile
slouken@422
   111
	rm -f config.status config.cache config.log libtool
slouken@578
   112
	rm -f SDL2_mixer.pc
slouken@302
   113
	rm -rf $(srcdir)/autom4te*
slouken@302
   114
	find $(srcdir) \( \
slouken@302
   115
	    -name '*~' -o \
slouken@302
   116
	    -name '*.bak' -o \
slouken@302
   117
	    -name '*.old' -o \
slouken@302
   118
	    -name '*.rej' -o \
slouken@302
   119
	    -name '*.orig' -o \
slouken@302
   120
	    -name '.#*' \) \
slouken@302
   121
	    -exec rm -f {} \;
slouken@302
   122
slouken@302
   123
dist $(distfile):
slouken@302
   124
	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
slouken@609
   125
	(cd $(srcdir); tar cf - $(DIST)) | (cd $(distdir); tar xf -)
slouken@302
   126
	rm -rf `find $(distdir) -name .svn`
slouken@302
   127
	rm -f `find $(distdir) -name '.#*'`
slouken@302
   128
	tar cvf - $(distdir) | gzip --best >$(distfile)
slouken@302
   129
	rm -rf $(distdir)
slouken@302
   130
slouken@302
   131
rpm: $(distfile)
slouken@302
   132
	rpmbuild -ta $?