exec_prefix=@exec_prefix@
prefix=@prefix@

bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@

srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ..

VPATH = @srcdir@

DLOBJS=@DLOBJS@
LIBOBJS=@LIBOBJS@
LIBRARY_LIB=@LIBRARY_LIB@

CC=@CC@
INSTALL=@INSTALL@
LIBTOOL=@LIBTOOL@
MKINSTALLDIRS=${top_srcdir}/mkinstalldirs

DEFS=@DEFS@
CFLAGS=@CFLAGS@ -Dunix
COMPILE=$(LIBTOOL) --silent --mode=compile $(CC) $(DEFS) $(CFLAGS) -I$(top_srcdir)/include -I$(top_builddir) -I$(top_builddir)/include -DMIKMOD_H=$(top_srcdir)/include/mikmod.h

LIB = libmikmod.la
OBJ = $(LIBOBJS) $(DLOBJS) \
      drv_AF.lo drv_aix.lo drv_alsa.lo drv_esd.lo drv_hp.lo drv_nos.lo \
      drv_oss.lo drv_pipe.lo drv_raw.lo drv_sam9407.lo drv_sgi.lo \
      drv_stdout.lo drv_sun.lo drv_ultra.lo drv_wav.lo \
      load_669.lo load_amf.lo load_dsm.lo load_far.lo load_gdm.lo load_it.lo  \
      load_imf.lo load_m15.lo load_med.lo load_mod.lo load_mtm.lo load_okt.lo \
      load_s3m.lo load_stm.lo load_stx.lo load_ult.lo load_uni.lo load_xm.lo \
      mmalloc.lo mmerror.lo mmio.lo \
      mdriver.lo mdreg.lo mdulaw.lo mloader.lo mlreg.lo mlutil.lo mplayer.lo \
      munitrk.lo mwav.lo npertab.lo sloader.lo virtch.lo virtch2.lo \
      virtch_common.lo

DIST_FILES = $(top_srcdir)/libmikmod/Makefile.in

all:		$(LIB)

install:	$(LIB)
	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
	$(LIBTOOL) --mode=install $(INSTALL) -m 644 $(LIB) $(DESTDIR)$(libdir)

uninstall:	$(LIB)
	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIB)

check:		FORCE
	echo "Of course it works ! (-:"

clean:		FORCE
	rm -fR .libs $(LIB) $(OBJ)

distdir:
	(for file in $(DIST_FILES);                                               \
	do                                                                        \
		cp -f $$file $(distdir) && chmod 644 $$file;                          \
	done)

distclean:	clean
	rm -f Makefile

$(LIB): $(OBJ)
	$(LIBTOOL) --mode=link $(CC) -version-info 2:4:0 -o $@ $(OBJ) $(LIBRARY_LIB) -rpath $(DESTDIR)$(libdir)

dl_hpux.lo:	$(top_srcdir)/dlapi/dl_hpux.c \
			$(top_srcdir)/dlapi/dlfcn.h
	$(COMPILE) -c $(top_srcdir)/dlapi/dl_hpux.c

drv_AF.lo:	$(top_srcdir)/drivers/drv_AF.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_AF.c
drv_aix.lo:	$(top_srcdir)/drivers/drv_aix.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_aix.c
drv_alsa.lo:	$(top_srcdir)/drivers/drv_alsa.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_alsa.c
drv_esd.lo:	$(top_srcdir)/drivers/drv_esd.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_esd.c
drv_hp.lo:	$(top_srcdir)/drivers/drv_hp.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_hp.c
drv_nos.lo:	$(top_srcdir)/drivers/drv_nos.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_nos.c
drv_pipe.lo:	$(top_srcdir)/drivers/drv_pipe.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_pipe.c
drv_oss.lo:	$(top_srcdir)/drivers/drv_oss.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_oss.c
drv_raw.lo:	$(top_srcdir)/drivers/drv_raw.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_raw.c
drv_sam9407.lo:	$(top_srcdir)/drivers/drv_sam9407.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_sam9407.c
drv_sgi.lo:	$(top_srcdir)/drivers/drv_sgi.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_sgi.c
drv_stdout.lo:	$(top_srcdir)/drivers/drv_stdout.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_stdout.c
drv_sun.lo:	$(top_srcdir)/drivers/drv_sun.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_sun.c
drv_ultra.lo:	$(top_srcdir)/drivers/drv_ultra.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_ultra.c
drv_wav.lo:	$(top_srcdir)/drivers/drv_wav.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_wav.c

load_669.lo:	$(top_srcdir)/loaders/load_669.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_669.c
load_amf.lo:	$(top_srcdir)/loaders/load_amf.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_amf.c
load_dsm.lo:	$(top_srcdir)/loaders/load_dsm.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_dsm.c
load_far.lo:	$(top_srcdir)/loaders/load_far.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_far.c
load_gdm.lo:	$(top_srcdir)/loaders/load_gdm.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_gdm.c
load_it.lo:	$(top_srcdir)/loaders/load_it.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_it.c
load_imf.lo:	$(top_srcdir)/loaders/load_imf.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_imf.c
load_m15.lo:	$(top_srcdir)/loaders/load_m15.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_m15.c
load_med.lo:	$(top_srcdir)/loaders/load_med.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_med.c
load_mod.lo:	$(top_srcdir)/loaders/load_mod.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_mod.c
load_mtm.lo:	$(top_srcdir)/loaders/load_mtm.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_mtm.c
load_okt.lo:	$(top_srcdir)/loaders/load_okt.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_okt.c
load_s3m.lo:	$(top_srcdir)/loaders/load_s3m.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_s3m.c
load_stm.lo:	$(top_srcdir)/loaders/load_stm.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_stm.c
load_stx.lo:	$(top_srcdir)/loaders/load_stx.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_stx.c
load_ult.lo:	$(top_srcdir)/loaders/load_ult.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_ult.c
load_uni.lo:	$(top_srcdir)/loaders/load_uni.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_uni.c
load_xm.lo:	$(top_srcdir)/loaders/load_xm.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_xm.c

mmalloc.lo:	$(top_srcdir)/mmio/mmalloc.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/mmio/mmalloc.c
mmerror.lo:	$(top_srcdir)/mmio/mmerror.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/mmio/mmerror.c
mmio.lo:		$(top_srcdir)/mmio/mmio.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/mmio/mmio.c

mdriver.lo:	$(top_srcdir)/playercode/mdriver.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mdriver.c
mdreg.lo:	$(top_srcdir)/playercode/mdreg.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mdreg.c
mdulaw.lo:	$(top_srcdir)/playercode/mdulaw.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mdulaw.c
mloader.lo:	$(top_srcdir)/playercode/mloader.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mloader.c
mlreg.lo:	$(top_srcdir)/playercode/mlreg.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mlreg.c
mlutil.lo:	$(top_srcdir)/playercode/mlutil.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mlutil.c
mplayer.lo:	$(top_srcdir)/playercode/mplayer.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mplayer.c
munitrk.lo:	$(top_srcdir)/playercode/munitrk.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/munitrk.c
mwav.lo:		$(top_srcdir)/playercode/mwav.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mwav.c
npertab.lo:	$(top_srcdir)/playercode/npertab.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/npertab.c
sloader.lo:	$(top_srcdir)/playercode/sloader.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/sloader.c
virtch.lo:	$(top_srcdir)/playercode/virtch.c $(top_srcdir)/playercode/virtch_common.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/virtch.c
virtch2.lo:	$(top_srcdir)/playercode/virtch2.c $(top_srcdir)/playercode/virtch_common.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/virtch2.c
virtch_common.lo:	$(top_srcdir)/playercode/virtch_common.c \
			$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/virtch_common.c

strcasecmp.lo:	$(top_srcdir)/posix/strcasecmp.c
	$(COMPILE) -c $(top_srcdir)/posix/strcasecmp.c
strdup.lo:	$(top_srcdir)/posix/strdup.c
	$(COMPILE) -c $(top_srcdir)/posix/strdup.c
strstr.lo:	$(top_srcdir)/posix/strstr.c
	$(COMPILE) -c $(top_srcdir)/posix/strstr.c


FORCE:
