in24/in32/fl32 little/big-endian QuickTime PCM audio support
[mplayer/glamo.git] / mp3lib / Makefile
blobf8c613e581ed85eb3217143b8f3537405a6a2f7b
2 include ../config.mak
4 SRCS = sr1.c
5 OBJS = sr1.o
6 # OBJS = $(SRCS:.c,.s=.o)
7 ifeq ($(TARGET_ARCH_SGI_MIPS),yes)
8 OPTFLAGS := $(OPTFLAGS:-O4=-O0)
9 endif
10 CFLAGS = -I.. $(OPTFLAGS) $(EXTRA_INC)
11 ifeq ($(TARGET_ARCH_X86),yes)
12 SRCS += decode_i586.c
13 OBJS += decode_i586.o
14 SRCS += decode_MMX.c dct64_MMX.c tabinit_MMX.c
15 OBJS += decode_MMX.o dct64_MMX.o tabinit_MMX.o
16 SRCS += dct36_3dnow.c dct64_3dnow.c
17 OBJS += dct36_3dnow.o dct64_3dnow.o
18 SRCS += dct36_k7.c dct64_k7.c
19 OBJS += dct36_k7.o dct64_k7.o
20 endif
21 ifeq ($(TARGET_ARCH_POWERPC),yes)
22 ifeq ($(TARGET_ALTIVEC),yes)
23 SRCS += dct64_altivec.c
24 OBJS += dct64_altivec.o
25 ifeq ($(TARGET_OS),Darwin)
26 CFLAGS += -faltivec
27 else
28 CFLAGS += -maltivec -mabi=altivec
29 endif
30 endif
31 endif
33 .SUFFIXES: .c .o
35 # .PHONY: all clean
37 all: libMP3.a
39 .c.o:
40 $(CC) -c $(CFLAGS) -o $@ $<
42 decode_i586.o: decode_i586.c
43 $(CC) -c $(CFLAGS) -fomit-frame-pointer -o $@ $<
45 .s.o:
46 $(CC) -c $(CFLAGS) -o $@ $<
48 libMP3.a: $(OBJS)
49 $(AR) r libMP3.a $(OBJS)
50 $(RANLIB) libMP3.a
52 test1: libMP3.a test.c
53 $(CC) $(CFLAGS) test.c ../libvo/aclib.c -o test1 -I.. ./libMP3.a ../mp_msg-mencoder.o ../cpudetect.o -lm
55 test2: libMP3.a test2.c
56 $(CC) $(CFLAGS) test2.c ../libvo/aclib.c -o test2 -I.. ./libMP3.a ../mp_msg-mencoder.o ../cpudetect.o -lm
58 clean:
59 rm -f *~ *.o *.a test1 test2
61 distclean: clean
62 rm -f .depend
64 dep: depend
66 depend:
67 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
70 # include dependency files if they exist
72 ifneq ($(wildcard .depend),)
73 include .depend
74 endif