Makefile.in 2.7 KB
Newer Older
1
2
# vorbis makefile configured for use with gcc on any platform

Monty's avatar
   
Monty committed
3
# $Id: Makefile.in,v 1.15 1999/11/17 03:52:56 xiphmont Exp $
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

###############################################################################
#                                                                             #
# 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 :) ##########################

@SET_MAKE@
Monty's avatar
   
Monty committed
19
FLAGS=-I. @TYPESIZES@ @CFLAGS@ 
20
21
22
23
24
25
26
27
28
29
OPT=@OPT@ $(FLAGS)
DEBUG=@DEBUG@ $(FLAGS)
PROFILE=@PROFILE@ $(FLAGS)
CC=@CC@
LD=@CC@
LDFLAGS=@LDFLAGS@ $(FLAGS)
AR=@AR@
RANLIB=@RANLIB@
LIBS=@LIBS@ -lm

Monty's avatar
   
Monty committed
30
HFILES =	mdct.h codec.h bitwise.h envelope.h lpc.h lsp.h \
Monty's avatar
   
Monty committed
31
		psy.h smallft.h window.h xlogmap.h os.h
Monty's avatar
   
Monty committed
32
LFILES = 	framing.o mdct.o smallft.o block.o envelope.o window.o\
Monty's avatar
   
Monty committed
33
34
		lsp.o lpc.o analysis.o synthesis.o psy.o info.o bitwise.o\
		spectrum.o
Monty's avatar
   
Monty committed
35
FFILES = 	vorbisfile.o
Monty's avatar
   
Monty committed
36
EFILES =	encoder_example.o decoder_example.o chaining_example.o
Monty's avatar
   
Monty committed
37
BINFILES =      encoder_example decoder_example chaining_example
38
39

all:
Monty's avatar
   
Monty committed
40
	$(MAKE) target CFLAGS="$(OPT)"
41

Monty's avatar
   
Monty committed
42
debug:	
43
44
	$(MAKE) target CFLAGS="$(DEBUG)"

Monty's avatar
   
Monty committed
45
46
47
analysis:	
	$(MAKE) target CFLAGS="$(DEBUG) -DANALYSIS"

48
49
50
profile: 
	$(MAKE) target CFLAGS="$(PROFILE)"

Monty's avatar
   
Monty committed
51
target:	libvorbis.a vorbisfile.a $(BINFILES)
Monty's avatar
   
Monty committed
52

Monty's avatar
   
Monty committed
53
selftest:	
54
55
	$(MAKE) clean
	$(CC) $(DEBUG) $(LDFLAGS) -D_V_SELFTEST framing.c -o test_framing 
Monty's avatar
   
Monty committed
56
57
	$(CC) $(DEBUG) $(LDFLAGS) -D_V_SELFTEST bitwise.c\
		-o test_bitwise -lm
58
59
	@echo
	@./test_framing
Monty's avatar
   
Monty committed
60
	@./test_bitwise
Monty's avatar
   
Monty committed
61

Monty's avatar
   
Monty committed
62
63
64
encoder_example:	$(EFILES) libvorbis.a
	$(CC) $(CFLAGS) $(LDFLAGS) encoder_example.o libvorbis.a -o \
			encoder_example -lm
65

Monty's avatar
   
Monty committed
66
67
68
decoder_example:	$(EFILES) libvorbis.a
	$(CC) $(CFLAGS) $(LDFLAGS) decoder_example.o libvorbis.a -o \
			decoder_example -lm
69

Monty's avatar
   
Monty committed
70
71
72
chaining_example:	$(EFILES) libvorbis.a vorbisfile.a
	$(CC) $(CFLAGS) $(LDFLAGS) chaining_example.o \
			vorbisfile.a libvorbis.a -o chaining_example -lm
Monty's avatar
   
Monty committed
73

Monty's avatar
   
Monty committed
74
libvorbis.a: 	$(LFILES)	
Monty's avatar
   
Monty committed
75
		$(AR) -r libvorbis.a $^
76
77
		$(RANLIB) libvorbis.a

Monty's avatar
   
Monty committed
78
79
80
81
82
vorbisfile.a:	$(FFILES)
		$(AR) -r vorbisfile.a $^
		$(RANLIB) vorbisfile.a


Monty's avatar
   
Monty committed
83
$(LFILES): 	$(HFILES)
Monty's avatar
   
Monty committed
84
85
$(FFILES): 	$(HFILES) vorbisfile.h
$(EFILES): 	$(HFILES) vorbisfile.h
86

Monty's avatar
   
Monty committed
87
88
info.o:		modes.h

89
90
91
92
.c.o:
	$(CC) $(CFLAGS) -c $<

clean:
Monty's avatar
   
Monty committed
93
94
95
96
97
	-rm -f *.o *.a test* *~ *.out ogg config.* $(BINFILES) tone 

distclean:	clean
	-rf -f Makefile