Added Makefile.in to vq/
[platform/upstream/libvorbis.git] / lib / Makefile.in
1 # vorbis makefile configured for use with gcc on any platform
2
3 # $Id: Makefile.in,v 1.15 1999/11/17 03:52:56 xiphmont Exp $
4
5 ###############################################################################
6 #                                                                             #
7 # To build a production vorbis (preferrably using gmake), just type 'make'.   #
8 # To build with debugging or profiling information, use 'make debug' or       #
9 # 'make profile' respectively.  'make clean' is a good idea between builds    #
10 # with different target names, or before a final build.                       #
11 #                                                                             #
12 ###############################################################################
13
14
15 # DO NOT EDIT BELOW! ##########################################################
16 # (unless, of course, you know what you are doing :) ##########################
17
18 @SET_MAKE@
19 FLAGS=-I. @TYPESIZES@ @CFLAGS@ 
20 OPT=@OPT@ $(FLAGS)
21 DEBUG=@DEBUG@ $(FLAGS)
22 PROFILE=@PROFILE@ $(FLAGS)
23 CC=@CC@
24 LD=@CC@
25 LDFLAGS=@LDFLAGS@ $(FLAGS)
26 AR=@AR@
27 RANLIB=@RANLIB@
28 LIBS=@LIBS@ -lm
29
30 HFILES =        mdct.h codec.h bitwise.h envelope.h lpc.h lsp.h \
31                 psy.h smallft.h window.h xlogmap.h os.h
32 LFILES =        framing.o mdct.o smallft.o block.o envelope.o window.o\
33                 lsp.o lpc.o analysis.o synthesis.o psy.o info.o bitwise.o\
34                 spectrum.o
35 FFILES =        vorbisfile.o
36 EFILES =        encoder_example.o decoder_example.o chaining_example.o
37 BINFILES =      encoder_example decoder_example chaining_example
38
39 all:
40         $(MAKE) target CFLAGS="$(OPT)"
41
42 debug:  
43         $(MAKE) target CFLAGS="$(DEBUG)"
44
45 analysis:       
46         $(MAKE) target CFLAGS="$(DEBUG) -DANALYSIS"
47
48 profile: 
49         $(MAKE) target CFLAGS="$(PROFILE)"
50
51 target: libvorbis.a vorbisfile.a $(BINFILES)
52
53 selftest:       
54         $(MAKE) clean
55         $(CC) $(DEBUG) $(LDFLAGS) -D_V_SELFTEST framing.c -o test_framing 
56         $(CC) $(DEBUG) $(LDFLAGS) -D_V_SELFTEST bitwise.c\
57                 -o test_bitwise -lm
58         @echo
59         @./test_framing
60         @./test_bitwise
61
62 encoder_example:        $(EFILES) libvorbis.a
63         $(CC) $(CFLAGS) $(LDFLAGS) encoder_example.o libvorbis.a -o \
64                         encoder_example -lm
65
66 decoder_example:        $(EFILES) libvorbis.a
67         $(CC) $(CFLAGS) $(LDFLAGS) decoder_example.o libvorbis.a -o \
68                         decoder_example -lm
69
70 chaining_example:       $(EFILES) libvorbis.a vorbisfile.a
71         $(CC) $(CFLAGS) $(LDFLAGS) chaining_example.o \
72                         vorbisfile.a libvorbis.a -o chaining_example -lm
73
74 libvorbis.a:    $(LFILES)       
75                 $(AR) -r libvorbis.a $^
76                 $(RANLIB) libvorbis.a
77
78 vorbisfile.a:   $(FFILES)
79                 $(AR) -r vorbisfile.a $^
80                 $(RANLIB) vorbisfile.a
81
82
83 $(LFILES):      $(HFILES)
84 $(FFILES):      $(HFILES) vorbisfile.h
85 $(EFILES):      $(HFILES) vorbisfile.h
86
87 info.o:         modes.h
88
89 .c.o:
90         $(CC) $(CFLAGS) -c $<
91
92 clean:
93         -rm -f *.o *.a test* *~ *.out ogg config.* $(BINFILES) tone 
94
95 distclean:      clean
96         -rf -f Makefile
97