Merge branch_beta3 onto the mainline.
[platform/upstream/libvorbis.git] / vq / Makefile
1 # $Id: Makefile,v 1.2 2000/11/06 00:07:25 xiphmont Exp $
2
3 ###############################################################################
4 #                                                                             #
5 # These are vq codebook generation tools for use by team members.  This       #
6 # makefile assumes gcc.                                                       #
7 #                                                                             #
8 # One need not build these utils to make libvorbis                            #
9 #                                                                             #
10 ###############################################################################
11
12 FLAGS=-I. -I../include 
13 OPT=-O20 $(FLAGS)
14 DEBUG=-g -Wall $(FLAGS)
15 PROFILE=-g -pg -O20 $(FLAGS)
16 CC=gcc
17 LD=gcc
18 LDFLAGS=$(FLAGS)
19 LIBS=-lm 
20
21 HFILES =        ../include/vorbis/codebook.h vqgen.h vqext.h bookutil.h
22
23 OFILES =        vqgen.o vqsplit.o bookutil.o ../lib/sharedbook.o
24 ALLOFILES =     $(OFILES) lspdata.o genericdata.o train.o build.o run.o\
25                 cascade.o partition.o metrics.o residuedata.o latticebuild.o\
26                 latticepare.o latticehint.o latticetune.o
27
28 all:
29         $(MAKE) target CFLAGS="$(OPT)"
30
31 debug:  
32         $(MAKE) target CFLAGS="$(DEBUG)"
33
34 profile: 
35         $(MAKE) target CFLAGS="$(PROFILE)"
36
37 target: lspvqtrain genericvqtrain residuevqtrain vqbuild vqcascade vqmetrics latticebuild latticepare latticehint latticetune huffbuild residuesplit
38
39 lspvqtrain:     $(OFILES) lspdata.o train.o
40         $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
41
42 residuevqtrain: $(OFILES) residuedata.o train.o
43         $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
44
45 genericvqtrain: $(OFILES) genericdata.o train.o
46         $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
47
48 vqbuild:        $(OFILES) build.o
49         $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
50
51 vqcascade:      $(OFILES) run.o cascade.o
52         $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
53
54 vqmetrics:      $(OFILES) run.o metrics.o
55         $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
56
57 latticebuild:   $(OFILES) latticebuild.o
58         $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
59
60 latticehint:    $(OFILES) latticehint.o
61         $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
62
63 latticepare:    $(OFILES) latticepare.o
64         $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
65
66 latticetune:    $(OFILES) latticetune.o
67         $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
68
69 huffbuild:      $(OFILES) huffbuild.o
70         $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
71
72 residuesplit:   $(OFILES) residuesplit.o
73         $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
74
75
76 $(ALLOFILES):   $(HFILES)
77
78 .c.o:
79         $(CC) $(CFLAGS) -c $<
80
81 $(OFILES):      $(HFILES)
82
83 clean:
84         -rm -f *.o *.a test* *~ *.out *.m config.* \
85                 lspvqtrain genericvqtrain residuevqtrain\
86                 vqbuild vqmetrics latticebuild vqcascade latticepare\
87                 huffbuild residuesplit
88
89 distclean:      clean
90         -rm -f Makefile