annotate mp3lib/Makefile @ 866:91087aaea5c7

using gcc -MM instead of makedepend, make OBJS from SRCS where possible
author arpi_esp
date Thu, 24 May 2001 21:09:13 +0000
parents 93304e7353c8
children 6d3a6d42c831
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 include config.mak
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 SRCS = sr1.c d_cpu.s decode_i586.s $(OPTIONAL_SRCS)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 OBJS = sr1.o d_cpu.o decode_i586.o $(OPTIONAL_OBJS)
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)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 CFLAGS = $(OPTFLAGS)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 .SUFFIXES: .c .o
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11 # .PHONY: all clean
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 .c.o:
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 $(CC) -c $(CFLAGS) -o $@ $<
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 .s.o:
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 $(CC) -c $(CFLAGS) -o $@ $<
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18
26
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
19 libMP3.a: .depend $(OBJS)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 $(AR) r libMP3.a $(OBJS)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21
789
989b921361d0 test2 added for playback test, testreanmed to test1 to make Atmosfear happy...
arpi_esp
parents: 788
diff changeset
22 test1: libMP3.a test.c
826
93304e7353c8 Added missing mathlib for linking.
atmosfear
parents: 789
diff changeset
23 $(CC) $(CFLAGS) test.c -o test1 -I.. -L. -lMP3 -lm
789
989b921361d0 test2 added for playback test, testreanmed to test1 to make Atmosfear happy...
arpi_esp
parents: 788
diff changeset
24
989b921361d0 test2 added for playback test, testreanmed to test1 to make Atmosfear happy...
arpi_esp
parents: 788
diff changeset
25 test2: libMP3.a test2.c
826
93304e7353c8 Added missing mathlib for linking.
atmosfear
parents: 789
diff changeset
26 $(CC) $(CFLAGS) test2.c -o test2 -I.. -L. -lMP3 -lm
788
214ea3f02d13 test.c added for benchmarking
arpi_esp
parents: 26
diff changeset
27
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 all: libMP3.a
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 clean:
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 rm -f *~ *.o *.a
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33 distclean:
26
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
34 rm -f *~ *.o *.a Makefile.bak .depend
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
35
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
36 dep: depend
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
37 depend: .depend
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38
26
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
39 .depend: Makefile config.mak ../config.mak ../config.h
866
91087aaea5c7 using gcc -MM instead of makedepend, make OBJS from SRCS where possible
arpi_esp
parents: 826
diff changeset
40 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41
26
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
42 #
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
43 # include dependency files if they exist
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
44 #
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
45 ifneq ($(wildcard .depend),)
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
46 include .depend
8ee4acebff58 New dependency system
arpi_esp
parents: 1
diff changeset
47 endif