annotate mp3lib/Makefile @ 10743:3d1eab0d9c5a

* Add multi device support. For the moment up to 16 cards are supported. More can be added easily by changing 2 defines. This makes 90% of the patch (mostly stupid s/$var/card->$var/) The different devices can be accessed by different minor numbers (0-15): mknod /dev/mga_vid0 c 178 0 mknod /dev/mga_vid1 c 178 1 mknod /dev/mga_vid2 c 178 2 mknod /dev/mga_vid3 c 178 3 ... ln -s mga_vid /dev/mga_vid * Change the devfs code to let the kernel assign us a major and a minor number (what is the sense behind using devfs anyways if we dont do that ?) Subdevices for the different cards are created. mga_vid uses the first card (for compatibility) * Fix a possible error when mmap() is called before the card is configured by a ioctl().
author attila
date Sun, 31 Aug 2003 20:57:34 +0000
parents 9163bdb578a6
children c8b84bb55089
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1
1258
50b8a3a5eeed Portability and old binutils support
nick
parents: 1245
diff changeset
2 include ../config.mak
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3
1270
8a9fa696b77d Minor cleanups
nick
parents: 1258
diff changeset
4 SRCS = sr1.c
8a9fa696b77d Minor cleanups
nick
parents: 1258
diff changeset
5 OBJS = sr1.o
866
91087aaea5c7 using gcc -MM instead of makedepend, make OBJS from SRCS where possible
arpi_esp
parents: 826
diff changeset
6 # OBJS = $(SRCS:.c,.s=.o)
2450
f51307170f69 MIPS support by oliver.schoenbrunner@jku.at
arpi
parents: 1461
diff changeset
7 ifeq ($(TARGET_ARCH_SGI_MIPS),yes)
f51307170f69 MIPS support by oliver.schoenbrunner@jku.at
arpi
parents: 1461
diff changeset
8 OPTFLAGS := $(OPTFLAGS:-O4=-O0)
f51307170f69 MIPS support by oliver.schoenbrunner@jku.at
arpi
parents: 1461
diff changeset
9 endif
1234
dfccdda074e5 OPTFLAGS vs. INCLUDES cleanup
arpi
parents: 1010
diff changeset
10 CFLAGS = $(OPTFLAGS) $(EXTRA_INC)
1258
50b8a3a5eeed Portability and old binutils support
nick
parents: 1245
diff changeset
11 ifeq ($(TARGET_ARCH_X86),yes)
4262
ae847143d1d7 Using cpudetect code instead of d_cpu.s
nick
parents: 4244
diff changeset
12 SRCS += decode_i586.c
ae847143d1d7 Using cpudetect code instead of d_cpu.s
nick
parents: 4244
diff changeset
13 OBJS += decode_i586.o
4165
nick
parents: 4148
diff changeset
14 SRCS += decode_MMX.c dct64_MMX.c tabinit_MMX.c
1258
50b8a3a5eeed Portability and old binutils support
nick
parents: 1245
diff changeset
15 OBJS += decode_MMX.o dct64_MMX.o tabinit_MMX.o
3203
8312f4bc8dab Disable SSE code and reenable FPU dct for SSE cpus (fpu code is 0.3% faster and I don't get data aligned in dct64_sse.s, so I can't finish optimizing it)
atmos4
parents: 2450
diff changeset
16 #ifeq ($(TARGET_SSE),yes)
8312f4bc8dab Disable SSE code and reenable FPU dct for SSE cpus (fpu code is 0.3% faster and I don't get data aligned in dct64_sse.s, so I can't finish optimizing it)
atmos4
parents: 2450
diff changeset
17 #SRCS += dct64_sse.s
8312f4bc8dab Disable SSE code and reenable FPU dct for SSE cpus (fpu code is 0.3% faster and I don't get data aligned in dct64_sse.s, so I can't finish optimizing it)
atmos4
parents: 2450
diff changeset
18 #OBJS += dct64_sse.o
8312f4bc8dab Disable SSE code and reenable FPU dct for SSE cpus (fpu code is 0.3% faster and I don't get data aligned in dct64_sse.s, so I can't finish optimizing it)
atmos4
parents: 2450
diff changeset
19 #endif
10322
9163bdb578a6 moved 3dnow and 3dnowex dct36 optimisations into gcc inline assembly
alex
parents: 9771
diff changeset
20 SRCS += dct36_3dnow.c dct64_3dnow.c
1258
50b8a3a5eeed Portability and old binutils support
nick
parents: 1245
diff changeset
21 OBJS += dct36_3dnow.o dct64_3dnow.o
10322
9163bdb578a6 moved 3dnow and 3dnowex dct36 optimisations into gcc inline assembly
alex
parents: 9771
diff changeset
22 SRCS += dct36_k7.c dct64_k7.c
1258
50b8a3a5eeed Portability and old binutils support
nick
parents: 1245
diff changeset
23 OBJS += dct36_k7.o dct64_k7.o
50b8a3a5eeed Portability and old binutils support
nick
parents: 1245
diff changeset
24 endif
9002
60d144a16088 An altivec-optimized DCT64 for mp3lib
arpi
parents: 8543
diff changeset
25 ifeq ($(TARGET_ARCH_POWERPC),yes)
60d144a16088 An altivec-optimized DCT64 for mp3lib
arpi
parents: 8543
diff changeset
26 ifeq ($(TARGET_ALTIVEC),yes)
60d144a16088 An altivec-optimized DCT64 for mp3lib
arpi
parents: 8543
diff changeset
27 SRCS += dct64_altivec.c
60d144a16088 An altivec-optimized DCT64 for mp3lib
arpi
parents: 8543
diff changeset
28 OBJS += dct64_altivec.o
9122
5ba896a38d75 The two attached patches *should* allow for proper
arpi
parents: 9002
diff changeset
29 ifeq ($(TARGET_OS),Darwin)
9002
60d144a16088 An altivec-optimized DCT64 for mp3lib
arpi
parents: 8543
diff changeset
30 CFLAGS += -faltivec
9122
5ba896a38d75 The two attached patches *should* allow for proper
arpi
parents: 9002
diff changeset
31 else
5ba896a38d75 The two attached patches *should* allow for proper
arpi
parents: 9002
diff changeset
32 CFLAGS += -maltivec -mabi=altivec
5ba896a38d75 The two attached patches *should* allow for proper
arpi
parents: 9002
diff changeset
33 endif
9002
60d144a16088 An altivec-optimized DCT64 for mp3lib
arpi
parents: 8543
diff changeset
34 endif
60d144a16088 An altivec-optimized DCT64 for mp3lib
arpi
parents: 8543
diff changeset
35 endif
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 .SUFFIXES: .c .o
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 # .PHONY: all clean
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40
8543
60fe896e437c decode_i586.c version uses %ebp for its own use, so:
arpi
parents: 7234
diff changeset
41 all: libMP3.a
60fe896e437c decode_i586.c version uses %ebp for its own use, so:
arpi
parents: 7234
diff changeset
42
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 .c.o:
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 $(CC) -c $(CFLAGS) -o $@ $<
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45
8543
60fe896e437c decode_i586.c version uses %ebp for its own use, so:
arpi
parents: 7234
diff changeset
46 decode_i586.o: decode_i586.c
60fe896e437c decode_i586.c version uses %ebp for its own use, so:
arpi
parents: 7234
diff changeset
47 $(CC) -c $(CFLAGS) -fomit-frame-pointer -o $@ $<
60fe896e437c decode_i586.c version uses %ebp for its own use, so:
arpi
parents: 7234
diff changeset
48
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 .s.o:
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 $(CC) -c $(CFLAGS) -o $@ $<
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51
1010
6d3a6d42c831 dependency stuff fixed
arpi_esp
parents: 866
diff changeset
52 libMP3.a: $(OBJS)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 $(AR) r libMP3.a $(OBJS)
4244
f1efe9e55647 rewrites symbols in d_cpu.s on cygwin
atmos4
parents: 4179
diff changeset
54 ifeq ($(TARGET_OS),CYGWIN)
f1efe9e55647 rewrites symbols in d_cpu.s on cygwin
atmos4
parents: 4179
diff changeset
55 ./mp3lib_objfix.sh
f1efe9e55647 rewrites symbols in d_cpu.s on cygwin
atmos4
parents: 4179
diff changeset
56 endif
9771
25614fe4ed1a objfix has to be run on MINGW32, too
faust3
parents: 9122
diff changeset
57 ifeq ($(TARGET_MINGW32),yes)
25614fe4ed1a objfix has to be run on MINGW32, too
faust3
parents: 9122
diff changeset
58 ./mp3lib_objfix.sh
25614fe4ed1a objfix has to be run on MINGW32, too
faust3
parents: 9122
diff changeset
59 endif
5909
adc04b7ed226 OpenBSD patch - by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents: 5607
diff changeset
60 ifeq ($(TARGET_OS),OpenBSD)
adc04b7ed226 OpenBSD patch - by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents: 5607
diff changeset
61 ./mp3lib_objfix.sh
adc04b7ed226 OpenBSD patch - by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents: 5607
diff changeset
62 endif
789
989b921361d0 test2 added for playback test, testreanmed to test1 to make Atmosfear happy...
arpi_esp
parents: 788
diff changeset
63 test1: libMP3.a test.c
7234
9edd9060e955 make test1 && make test2 fixed
arpi
parents: 7148
diff changeset
64 $(CC) $(CFLAGS) test.c ../libvo/aclib.c -o test1 -I.. ./libMP3.a ../mp_msg-mencoder.o ../cpudetect.o -lm
789
989b921361d0 test2 added for playback test, testreanmed to test1 to make Atmosfear happy...
arpi_esp
parents: 788
diff changeset
65
989b921361d0 test2 added for playback test, testreanmed to test1 to make Atmosfear happy...
arpi_esp
parents: 788
diff changeset
66 test2: libMP3.a test2.c
7234
9edd9060e955 make test1 && make test2 fixed
arpi
parents: 7148
diff changeset
67 $(CC) $(CFLAGS) test2.c ../libvo/aclib.c -o test2 -I.. ./libMP3.a ../mp_msg-mencoder.o ../cpudetect.o -lm
788
214ea3f02d13 test.c added for benchmarking
arpi_esp
parents: 26
diff changeset
68
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69 clean:
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70 rm -f *~ *.o *.a
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 distclean:
26
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
73 rm -f *~ *.o *.a Makefile.bak .depend
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
74
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
75 dep: depend
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
76
1010
6d3a6d42c831 dependency stuff fixed
arpi_esp
parents: 866
diff changeset
77 depend:
866
91087aaea5c7 using gcc -MM instead of makedepend, make OBJS from SRCS where possible
arpi_esp
parents: 826
diff changeset
78 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
79
26
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
80 #
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
81 # include dependency files if they exist
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
82 #
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
83 ifneq ($(wildcard .depend),)
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
84 include .depend
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
85 endif