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

Michael Smith's avatar
   
Michael Smith committed
3
# $Id: Makefile.in,v 1.25 2000/04/12 07:55:06 msmith 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. -I../include @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

Michael Smith's avatar
   
Michael Smith committed
30
HFILES =	../include/vorbis/codec.h \
Monty's avatar
   
Monty committed
31
		../include/vorbis/internal.h ../include/vorbis/backends.h \
Monty's avatar
   
Monty committed
32
33
34
		../include/vorbis/codebook.h \
		bitwise.h envelope.h lpc.h lsp.h bookinternal.h misc.h\
		psy.h smallft.h window.h scales.h os.h mdct.h registry.h
Monty's avatar
   
Monty committed
35
LFILES = 	framing.o mdct.o smallft.o block.o envelope.o window.o\
Monty's avatar
   
Monty committed
36
		lsp.o lpc.o analysis.o synthesis.o psy.o info.o bitwise.o\
Monty's avatar
   
Monty committed
37
		time0.o floor0.o res0.o mapping0.o registry.o\
Michael Smith's avatar
   
Michael Smith committed
38
39
40
41
42
43
		codebook.o
VF_HFILES = ../include/vorbis/vorbisfile.h ../include/vorbis/codec.h \
		../include/vorbis/internal.h ../include/vorbis/codebook.h \
		os.h misc.h
VF_LFILES = vorbisfile.o

44
45

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

Monty's avatar
   
Monty committed
48
debug:	
49
50
	$(MAKE) target CFLAGS="$(DEBUG)"

Monty's avatar
   
Monty committed
51
52
53
analysis:	
	$(MAKE) target CFLAGS="$(DEBUG) -DANALYSIS"

54
55
56
profile: 
	$(MAKE) target CFLAGS="$(PROFILE)"

Monty's avatar
   
Monty committed
57
target:	libvorbis.a vorbisfile.a
Monty's avatar
   
Monty committed
58

Monty's avatar
   
Monty committed
59
selftest:	
60
61
	$(MAKE) clean
	$(CC) $(DEBUG) $(LDFLAGS) -D_V_SELFTEST framing.c -o test_framing 
Monty's avatar
   
Monty committed
62
63
	$(CC) $(DEBUG) $(LDFLAGS) -D_V_SELFTEST bitwise.c\
		-o test_bitwise -lm
Monty's avatar
   
Monty committed
64
65
66
	$(CC) $(DEBUG) $(LDFLAGS) -c bitwise.c
	$(CC) $(DEBUG) $(LDFLAGS) -D_V_SELFTEST codebook.c bitwise.o\
		-o test_codebook -lm
67
68
	@echo
	@./test_framing
Monty's avatar
   
Monty committed
69
	@./test_bitwise
Monty's avatar
   
Monty committed
70
	@./test_codebook
Monty's avatar
   
Monty committed
71

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

Michael Smith's avatar
   
Michael Smith committed
76
vorbisfile.a:	$(VF_LFILES)
Monty's avatar
   
Monty committed
77
78
79
80
		$(AR) -r vorbisfile.a $^
		$(RANLIB) vorbisfile.a


Monty's avatar
   
Monty committed
81
$(LFILES): 	$(HFILES)
Michael Smith's avatar
   
Michael Smith committed
82
$(VF_LFILES): 	$(VF_HFILES)
Monty's avatar
   
Monty committed
83

84
85
86
87
.c.o:
	$(CC) $(CFLAGS) -c $<

clean:
Monty's avatar
   
Monty committed
88
	-rm -f *.o *.a test* *~ *.out ogg config.* tone 
Monty's avatar
   
Monty committed
89
90

distclean:	clean
Monty's avatar
   
Monty committed
91
	-rm -f Makefile
Monty's avatar
   
Monty committed
92