# Generated automatically from Makefile.in by configure.
# $Id: Makefile.in,v 1.14 2000/07/17 12:55:37 xiphmont Exp $

###############################################################################
#                                                                             #
# To build a production vorbis (preferrably using gmake), just type 'make'.   #
# To build with debugging or profiling information, use 'make debug' or       #
# 'make profile' respectively.  'make clean' is a good idea between builds    #
# with different target names, or before a final build.                       #
#                                                                             #
###############################################################################


# DO NOT EDIT BELOW! ##########################################################
# (unless, of course, you know what you are doing :) ##########################


FLAGS=-I. -I../include -g -DUSE_ALLOCA_H -DUSE_MEMORY_H
OPT=-xO4 -fast -w -fsimple -native -xcg92 $(FLAGS)
DEBUG=-v -g $(FLAGS)
PROFILE=-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc $(FLAGS)
CC=cc
LD=cc
LDFLAGS= $(FLAGS)
AR=ar
RANLIB=ranlib
LIBS=-lm 

HFILES =	../include/vorbis/codebook.h vqgen.h vqext.h bookutil.h

OFILES = 	vqgen.o vqsplit.o bookutil.o ../lib/sharedbook.o
ALLOFILES = 	$(OFILES) lspdata.o genericdata.o train.o build.o run.o\
		cascade.o partition.o metrics.o residuedata.o latticebuild.o\
		latticepare.o latticehint.o latticetune.o

all:
	$(MAKE) target CFLAGS="$(OPT)"

debug:	
	$(MAKE) target CFLAGS="$(DEBUG)"

profile: 
	$(MAKE) target CFLAGS="$(PROFILE)"

target:	lspvqtrain genericvqtrain residuevqtrain vqbuild vqcascade vqmetrics latticebuild latticepare latticehint latticetune

lspvqtrain:	$(OFILES) lspdata.o train.o
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)

residuevqtrain:	$(OFILES) residuedata.o train.o
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)

genericvqtrain:	$(OFILES) genericdata.o train.o
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)

vqbuild:	$(OFILES) build.o
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)

vqcascade:	$(OFILES) run.o cascade.o
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)

vqmetrics:	$(OFILES) run.o metrics.o
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)

latticebuild:	$(OFILES) latticebuild.o
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)

latticehint:	$(OFILES) latticehint.o
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)

latticepare:	$(OFILES) latticepare.o
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)

latticetune:	$(OFILES) latticetune.o
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)


$(ALLOFILES): 	$(HFILES)

.c.o:
	$(CC) $(CFLAGS) -c $<

$(OFILES):	$(HFILES)

clean:
	-rm -f *.o *.a test* *~ *.out *.m config.* \
		lspvqtrain genericvqtrain residuevqtrain\
		vqbuild vqmetrics latticebuild vqcascade latticepare

distclean:	clean
	-rm -f Makefile
