Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Tue, 11 Jan 2011 01:29:19 -0800
changeset 491 0f6c89f20c76
parent 481 286c27f54ea1
child 494 4f4caf04bcd1
permissions -rw-r--r--
Added Android Makefile to create an SDL_mixer shared library
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@302
    16
distdir = SDL_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@302
    23
CFLAGS  = @BUILD_CFLAGS@
slouken@302
    24
EXTRA_CFLAGS = @EXTRA_CFLAGS@
slouken@302
    25
LDFLAGS = @BUILD_LDFLAGS@
slouken@302
    26
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
slouken@302
    27
LIBTOOL = @LIBTOOL@
slouken@302
    28
INSTALL = @INSTALL@
slouken@302
    29
AR	= @AR@
slouken@302
    30
RANLIB	= @RANLIB@
slouken@368
    31
WINDRES	= @WINDRES@
slouken@302
    32
SDL_CFLAGS = @SDL_CFLAGS@
slouken@302
    33
SDL_LIBS = @SDL_LIBS@
slouken@302
    34
slouken@302
    35
TARGET  = libSDL_mixer.la
slouken@302
    36
OBJECTS = @OBJECTS@
slouken@422
    37
VERSION_OBJECTS = @VERSION_OBJECTS@
slouken@422
    38
PLAYWAVE_OBJECTS = @PLAYWAVE_OBJECTS@
slouken@422
    39
PLAYMUS_OBJECTS = @PLAYMUS_OBJECTS@
slouken@302
    40
slouken@491
    41
DIST = Android.mk 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_flac.c dynamic_flac.h dynamic_mod.c dynamic_mod.h 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 libmikmod-3.1.12.zip load_aiff.c load_aiff.h load_flac.c load_flac.h load_ogg.c load_ogg.h load_voc.c load_voc.h mixer.c music.c music_cmd.c music_cmd.h music_flac.c music_flac.h music_mad.c music_mad.h music_mod.c music_mod.h music_modplug.c music_modplug.h music_ogg.c music_ogg.h native_midi native_midi_gpl playmus.c playwave.c timidity wavestream.c wavestream.h version.rc
slouken@302
    42
slouken@302
    43
LT_AGE      = @LT_AGE@
slouken@302
    44
LT_CURRENT  = @LT_CURRENT@
slouken@302
    45
LT_RELEASE  = @LT_RELEASE@
slouken@302
    46
LT_REVISION = @LT_REVISION@
slouken@302
    47
LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
slouken@302
    48
slouken@302
    49
all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/playwave$(EXE) $(objects)/playmus$(EXE)
slouken@302
    50
slouken@302
    51
$(srcdir)/configure: $(srcdir)/configure.in
slouken@302
    52
	@echo "Warning, configure.in is out of date"
slouken@302
    53
	#(cd $(srcdir) && sh autogen.sh && sh configure)
slouken@302
    54
	@sleep 3
slouken@302
    55
slouken@302
    56
Makefile: $(srcdir)/Makefile.in
slouken@302
    57
	$(SHELL) config.status $@
slouken@302
    58
slouken@302
    59
$(objects):
slouken@302
    60
	$(SHELL) $(auxdir)/mkinstalldirs $@
slouken@302
    61
slouken@422
    62
.PHONY: all install install-hdrs install-lib install-bin uninstall uninstall-hdrs uninstall-lib uninstall-bin clean distclean dist
slouken@422
    63
slouken@422
    64
-include $(OBJECTS:.lo=.d)
slouken@422
    65
@DEPENDS@
slouken@422
    66
@VERSION_DEPENDS@
slouken@422
    67
slouken@422
    68
-include $(PLAYWAVE_OBJECTS:.lo=.d)
slouken@422
    69
@PLAYWAVE_DEPENDS@
slouken@422
    70
slouken@422
    71
-include $(PLAYMUS_OBJECTS:.lo=.d)
slouken@422
    72
@PLAYMUS_DEPENDS@
slouken@422
    73
slouken@422
    74
$(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
slouken@422
    75
	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
slouken@422
    76
slouken@302
    77
$(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET)
slouken@302
    78
	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
slouken@302
    79
slouken@302
    80
$(objects)/playmus$(EXE): $(objects)/playmus.lo $(objects)/$(TARGET)
slouken@302
    81
	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
slouken@302
    82
slouken@306
    83
install: all install-hdrs install-lib #install-bin
slouken@302
    84
install-hdrs:
slouken@302
    85
	$(SHELL) $(auxdir)/mkinstalldirs $(includedir)/SDL
slouken@302
    86
	for src in $(srcdir)/SDL_mixer.h; do \
slouken@302
    87
	    file=`echo $$src | sed -e 's|^.*/||'`; \
slouken@302
    88
	    $(INSTALL) -m 644 $$src $(includedir)/SDL/$$file; \
slouken@302
    89
	done
slouken@392
    90
	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)/pkgconfig
slouken@392
    91
	$(INSTALL) -m 644 SDL_mixer.pc $(libdir)/pkgconfig/
slouken@355
    92
install-lib: $(objects) $(objects)/$(TARGET)
slouken@302
    93
	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)
slouken@302
    94
	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
slouken@302
    95
install-bin:
slouken@302
    96
	$(SHELL) $(auxdir)/mkinstalldirs $(bindir)
slouken@302
    97
	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playwave$(EXE) $(bindir)/playwave$(EXE)
slouken@302
    98
	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playmus$(EXE) $(bindir)/playmus$(EXE)
slouken@302
    99
slouken@302
   100
uninstall: uninstall-hdrs uninstall-lib uninstall-bin
slouken@302
   101
uninstall-hdrs:
slouken@302
   102
	for src in $(srcdir)/SDL_mixer.h; do \
slouken@302
   103
	    file=`echo $$src | sed -e 's|^.*/||'`; \
slouken@302
   104
	    rm -f $(includedir)/SDL/$$file; \
slouken@302
   105
	done
slouken@302
   106
	-rmdir $(includedir)/SDL
slouken@392
   107
	rm -f $(libdir)/pkgconfig/SDL_mixer.pc
slouken@392
   108
	-rmdir $(libdir)/pkgconfig
slouken@302
   109
uninstall-lib:
slouken@302
   110
	$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
slouken@302
   111
uninstall-bin:
slouken@302
   112
	rm -f $(bindir)/playwave$(EXE)
slouken@302
   113
	rm -f $(bindir)/playmus$(EXE)
slouken@302
   114
slouken@302
   115
clean:
slouken@302
   116
	rm -rf $(objects)
slouken@302
   117
slouken@302
   118
distclean: clean
slouken@302
   119
	rm -f Makefile
slouken@302
   120
	rm -f SDL_mixer.qpg
slouken@422
   121
	rm -f config.status config.cache config.log libtool
slouken@392
   122
	rm -f SDL_mixer.pc
slouken@302
   123
	rm -rf $(srcdir)/autom4te*
slouken@302
   124
	find $(srcdir) \( \
slouken@302
   125
	    -name '*~' -o \
slouken@302
   126
	    -name '*.bak' -o \
slouken@302
   127
	    -name '*.old' -o \
slouken@302
   128
	    -name '*.rej' -o \
slouken@302
   129
	    -name '*.orig' -o \
slouken@302
   130
	    -name '.#*' \) \
slouken@302
   131
	    -exec rm -f {} \;
slouken@302
   132
slouken@302
   133
dist $(distfile):
slouken@302
   134
	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
slouken@302
   135
	tar cf - $(DIST) | (cd $(distdir); tar xf -)
slouken@302
   136
	rm -rf `find $(distdir) -name .svn`
slouken@302
   137
	rm -f `find $(distdir) -name '.#*'`
slouken@302
   138
	tar cvf - $(distdir) | gzip --best >$(distfile)
slouken@302
   139
	rm -rf $(distdir)
slouken@302
   140
slouken@302
   141
rpm: $(distfile)
slouken@302
   142
	rpmbuild -ta $?