Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Sat, 13 May 2006 04:49:47 +0000
changeset 317 b83165bc4ae2
parent 307 0afaaf661ce8
child 318 97fd4f55a72b
permissions -rw-r--r--
Need to distribute configure
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
depend	= build-deps
slouken@302
     7
prefix = @prefix@
slouken@302
     8
exec_prefix = @exec_prefix@
slouken@302
     9
bindir	= $(DESTDIR)@bindir@
slouken@302
    10
libdir  = $(DESTDIR)@libdir@
slouken@302
    11
includedir = $(DESTDIR)@includedir@
slouken@302
    12
datadir	= $(DESTDIR)@datadir@
slouken@302
    13
mandir	= $(DESTDIR)@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@302
    31
SDL_CFLAGS = @SDL_CFLAGS@
slouken@302
    32
SDL_LIBS = @SDL_LIBS@
slouken@302
    33
slouken@302
    34
TARGET  = libSDL_mixer.la
slouken@302
    35
SOURCES = @SOURCES@
slouken@302
    36
OBJECTS = @OBJECTS@
slouken@302
    37
slouken@317
    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.m4 autogen.sh build-scripts configure configure.in 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_ogg.c music_ogg.h native_midi native_midi_gpl playmus.c playwave.c timidity wavestream.c wavestream.h
slouken@302
    39
slouken@302
    40
LT_AGE      = @LT_AGE@
slouken@302
    41
LT_CURRENT  = @LT_CURRENT@
slouken@302
    42
LT_RELEASE  = @LT_RELEASE@
slouken@302
    43
LT_REVISION = @LT_REVISION@
slouken@302
    44
LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
slouken@302
    45
slouken@302
    46
all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/playwave$(EXE) $(objects)/playmus$(EXE)
slouken@302
    47
slouken@302
    48
$(srcdir)/configure: $(srcdir)/configure.in
slouken@302
    49
	@echo "Warning, configure.in is out of date"
slouken@302
    50
	#(cd $(srcdir) && sh autogen.sh && sh configure)
slouken@302
    51
	@sleep 3
slouken@302
    52
slouken@302
    53
Makefile: $(srcdir)/Makefile.in
slouken@302
    54
	$(SHELL) config.status $@
slouken@302
    55
slouken@302
    56
$(objects):
slouken@302
    57
	$(SHELL) $(auxdir)/mkinstalldirs $@
slouken@302
    58
slouken@302
    59
$(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET)
slouken@302
    60
	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
slouken@302
    61
slouken@302
    62
$(objects)/playmus$(EXE): $(objects)/playmus.lo $(objects)/$(TARGET)
slouken@302
    63
	$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET)
slouken@302
    64
slouken@302
    65
.PHONY: all depend install install-hdrs install-lib install-bin uninstall uninstall-hdrs uninstall-lib uninstall-bin clean distclean dist
slouken@302
    66
depend:
slouken@302
    67
	@SOURCES="$(SOURCES)" INCLUDE="$(INCLUDE)" output="$(depend)" \
slouken@302
    68
	$(SHELL) $(auxdir)/makedep.sh
slouken@302
    69
	echo "\$$(objects)/playwave.lo: \$$(srcdir)/playwave.c" >>$(depend)
slouken@302
    70
	echo "	\$$(LIBTOOL) --mode=compile \$$(CC) \$$(CFLAGS) \$$(SDL_CFLAGS) -c \$$(srcdir)/playwave.c  -o \$$@" >>$(depend)
slouken@302
    71
	echo "" >>$(depend)
slouken@302
    72
	echo "\$$(objects)/playmus.lo: \$$(srcdir)/playmus.c" >>$(depend)
slouken@302
    73
	echo "	\$$(LIBTOOL) --mode=compile \$$(CC) \$$(CFLAGS) \$$(SDL_CFLAGS) -c \$$(srcdir)/playmus.c  -o \$$@" >>$(depend)
slouken@302
    74
	echo "" >>$(depend)
slouken@302
    75
slouken@302
    76
include $(depend)
slouken@302
    77
slouken@302
    78
$(objects)/$(TARGET): $(OBJECTS)
slouken@302
    79
	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
slouken@302
    80
slouken@306
    81
install: all install-hdrs install-lib #install-bin
slouken@302
    82
install-hdrs:
slouken@302
    83
	$(SHELL) $(auxdir)/mkinstalldirs $(includedir)/SDL
slouken@302
    84
	for src in $(srcdir)/SDL_mixer.h; do \
slouken@302
    85
	    file=`echo $$src | sed -e 's|^.*/||'`; \
slouken@302
    86
	    $(INSTALL) -m 644 $$src $(includedir)/SDL/$$file; \
slouken@302
    87
	done
slouken@302
    88
install-lib:
slouken@302
    89
	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)
slouken@302
    90
	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
slouken@302
    91
install-bin:
slouken@302
    92
	$(SHELL) $(auxdir)/mkinstalldirs $(bindir)
slouken@302
    93
	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playwave$(EXE) $(bindir)/playwave$(EXE)
slouken@302
    94
	$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playmus$(EXE) $(bindir)/playmus$(EXE)
slouken@302
    95
slouken@302
    96
uninstall: uninstall-hdrs uninstall-lib uninstall-bin
slouken@302
    97
uninstall-hdrs:
slouken@302
    98
	for src in $(srcdir)/SDL_mixer.h; do \
slouken@302
    99
	    file=`echo $$src | sed -e 's|^.*/||'`; \
slouken@302
   100
	    rm -f $(includedir)/SDL/$$file; \
slouken@302
   101
	done
slouken@302
   102
	-rmdir $(includedir)/SDL
slouken@302
   103
uninstall-lib:
slouken@302
   104
	$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
slouken@302
   105
uninstall-bin:
slouken@302
   106
	rm -f $(bindir)/playwave$(EXE)
slouken@302
   107
	rm -f $(bindir)/playmus$(EXE)
slouken@302
   108
slouken@302
   109
clean:
slouken@302
   110
	rm -rf $(objects)
slouken@302
   111
	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
slouken@302
   112
slouken@302
   113
distclean: clean
slouken@302
   114
	rm -f Makefile
slouken@302
   115
	rm -f SDL_mixer.qpg
slouken@302
   116
	rm -f config.status config.cache config.log libtool $(depend)
slouken@302
   117
	rm -rf $(srcdir)/autom4te*
slouken@302
   118
	find $(srcdir) \( \
slouken@302
   119
	    -name '*~' -o \
slouken@302
   120
	    -name '*.bak' -o \
slouken@302
   121
	    -name '*.old' -o \
slouken@302
   122
	    -name '*.rej' -o \
slouken@302
   123
	    -name '*.orig' -o \
slouken@302
   124
	    -name '.#*' \) \
slouken@302
   125
	    -exec rm -f {} \;
slouken@302
   126
slouken@302
   127
dist $(distfile):
slouken@302
   128
	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
slouken@302
   129
	tar cf - $(DIST) | (cd $(distdir); tar xf -)
slouken@302
   130
	rm -rf `find $(distdir) -name .svn`
slouken@302
   131
	rm -f `find $(distdir) -name '.#*'`
slouken@302
   132
	tar cvf - $(distdir) | gzip --best >$(distfile)
slouken@302
   133
	rm -rf $(distdir)
slouken@302
   134
slouken@302
   135
rpm: $(distfile)
slouken@302
   136
	rpmbuild -ta $?