comparison mp3lib/Makefile @ 21259:92b122592776

Merge common parts of all Makefiles into one file included by all.
author diego
date Sun, 26 Nov 2006 18:12:36 +0000
parents 68df3b19a160
children b2eeabacef4d
comparison
equal deleted inserted replaced
21258:ed01090d1192 21259:92b122592776
1 1
2 include ../config.mak 2 include ../config.mak
3
4 LIBNAME = libMP3.a
3 5
4 ifeq ($(TARGET_ARCH_SGI_MIPS),yes) 6 ifeq ($(TARGET_ARCH_SGI_MIPS),yes)
5 OPTFLAGS := $(OPTFLAGS:-O4=-O0) 7 OPTFLAGS := $(OPTFLAGS:-O4=-O0)
6 endif 8 endif
7 CFLAGS = -I.. $(OPTFLAGS) 9 CFLAGS = -I.. $(OPTFLAGS)
31 CFLAGS += -maltivec -mabi=altivec 33 CFLAGS += -maltivec -mabi=altivec
32 endif 34 endif
33 endif 35 endif
34 endif 36 endif
35 37
36 OBJS=$(SRCS:.c=.o) 38 include ../mpcommon.mak
37
38 .SUFFIXES: .c .o
39
40 # .PHONY: all clean
41
42 all: libMP3.a
43
44 .c.o:
45 $(CC) -c $(CFLAGS) -o $@ $<
46 39
47 decode_i586.o: decode_i586.c 40 decode_i586.o: decode_i586.c
48 $(CC) -c $(CFLAGS) -fomit-frame-pointer -o $@ $< 41 $(CC) -c $(CFLAGS) -fomit-frame-pointer -o $@ $<
49 42
50 .s.o: 43 .s.o:
51 $(CC) -c $(CFLAGS) -o $@ $< 44 $(CC) -c $(CFLAGS) -o $@ $<
52 45
53 libMP3.a: $(OBJS)
54 $(AR) r libMP3.a $(OBJS)
55 $(RANLIB) libMP3.a
56
57 test1: libMP3.a test.c 46 test1: libMP3.a test.c
58 $(CC) $(CFLAGS) test.c ../libvo/aclib.c -o test1 -I.. ./libMP3.a ../mp_msg-mencoder.o ../cpudetect.o -lm 47 $(CC) $(CFLAGS) test.c ../libvo/aclib.c -o test1 -I.. ./libMP3.a ../mp_msg-mencoder.o ../cpudetect.o -lm
59 48
60 test2: libMP3.a test2.c 49 test2: libMP3.a test2.c
61 $(CC) $(CFLAGS) test2.c ../libvo/aclib.c -o test2 -I.. ./libMP3.a ../mp_msg-mencoder.o ../cpudetect.o -lm 50 $(CC) $(CFLAGS) test2.c ../libvo/aclib.c -o test2 -I.. ./libMP3.a ../mp_msg-mencoder.o ../cpudetect.o -lm
62 51
63 clean: 52 distclean::
64 rm -f *~ *.o *.a test1 test2 53 rm -f test1 test2
65
66 distclean: clean
67 rm -f .depend
68
69 dep depend:
70 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
71
72 ifneq ($(wildcard .depend),)
73 include .depend
74 endif