Makefile.in 3 KB
Newer Older
1
# vorbis makefile configured for use with gcc on any platform
Monty's avatar
   
Monty committed
2
# $Id: Makefile.in,v 1.29 2000/06/14 01:38:30 xiphmont Exp $
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

###############################################################################
#                                                                             #
# 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
18
FLAGS=-I. -I../include @TYPESIZES@ @CFLAGS@ 
19
20
21
22
23
24
25
26
27
28
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
29
HFILES =	../include/vorbis/codec.h \
Monty's avatar
   
Monty committed
30
		../include/vorbis/internal.h ../include/vorbis/backends.h \
Monty's avatar
   
Monty committed
31
32
		../include/vorbis/codebook.h \
		bitwise.h envelope.h lpc.h lsp.h bookinternal.h misc.h\
Monty's avatar
   
Monty committed
33
34
		psy.h smallft.h window.h scales.h os.h mdct.h registry.h\
		masking.h sharedbook.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\
Monty's avatar
   
Monty committed
38
		codebook.o sharedbook.o
Michael Smith's avatar
   
Michael Smith committed
39
40
41
42
43
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

dbt's avatar
dbt committed
44
45
46
PSY_FILES = mdct.o psy.o lpc.o smallft.o window.o psytune.o floor0.o \
	bitwise.o lsp.o codebook.o sharedbook.o

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

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

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

56
57
58
profile: 
	$(MAKE) target CFLAGS="$(PROFILE)"

Monty's avatar
   
Monty committed
59
target:	libvorbis.a vorbisfile.a psytune
Monty's avatar
   
Monty committed
60

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

Monty's avatar
   
Monty committed
78
libvorbis.a: 	$(LFILES)	
dbt's avatar
dbt committed
79
		$(AR) -r libvorbis.a $(LFILES)
80
81
		$(RANLIB) libvorbis.a

Michael Smith's avatar
   
Michael Smith committed
82
vorbisfile.a:	$(VF_LFILES)
dbt's avatar
dbt committed
83
		$(AR) -r vorbisfile.a $(VF_LFILES)
Monty's avatar
   
Monty committed
84
85
		$(RANLIB) vorbisfile.a

dbt's avatar
dbt committed
86
87
psytune:	$(PSY_FILES)
	        $(CC) $(CFLAGS) $(LDFLAGS) $(PSY_FILES) -o $@ $(LIBS)
Monty's avatar
   
Monty committed
88

Monty's avatar
   
Monty committed
89
$(LFILES): 	$(HFILES)
Michael Smith's avatar
   
Michael Smith committed
90
$(VF_LFILES): 	$(VF_HFILES)
Monty's avatar
   
Monty committed
91

92
93
94
95
.c.o:
	$(CC) $(CFLAGS) -c $<

clean:
Monty's avatar
   
Monty committed
96
	-rm -f *.o *.a test* *~ *.out ogg config.* tone 
Monty's avatar
   
Monty committed
97
98

distclean:	clean
Monty's avatar
   
Monty committed
99
	-rm -f Makefile
Monty's avatar
   
Monty committed
100