7031
|
1
|
|
2 ifneq ($(wildcard ../config.mak),)
|
|
3 include ../config.mak
|
|
4 endif
|
|
5
|
|
6 SRCS = css.c device.c dvd_input.c dvd_reader.c dvd_udf.c error.c ifo_print.c ifo_read.c ioctl.c libdvdcss.c nav_print.c nav_read.c
|
|
7
|
|
8 #bsdi_ioctl.c
|
|
9
|
|
10 OBJS = $(SRCS:.c=.o)
|
|
11
|
|
12 LIB=libmpdvdkit
|
|
13
|
|
14 .SUFFIXES: .c .o
|
|
15
|
|
16 ifeq ($(OPTFLAGS),)
|
|
17 OPTFLAGS = -mcpu=pentium -march=pentium -O4
|
|
18 else
|
|
19 OPTFLAGS += -DHAVE_MPLAYER
|
|
20 endif
|
|
21
|
|
22 # \ -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
|
23
|
|
24 # -funroll-loops removed, triggered gcc 3.0.4 (3.x?) bug
|
|
25 CFLAGS= -I. $(OPTFLAGS) $(EXTRA_INC)\
|
8981
|
26 -DSYS_LINUX -D__USE_UNIX98 -D_REENTRANT -D_GNU_SOURCE
|
7031
|
27
|
|
28 .c.o:
|
|
29 $(CC) $(CFLAGS) -c -o $@ $<
|
|
30
|
|
31 all: $(LIB).a
|
|
32 default: $(LIB).a
|
|
33
|
|
34 $(LIB).a: $(OBJS)
|
|
35 $(AR) rc $(LIB).a $(OBJS)
|
12632
|
36 $(RANLIB) $(LIB).a
|
7031
|
37
|
|
38 $(LIB).so: $(OBJS)
|
|
39 $(CC) -o $(LIB).so -shared -rdynamic $(OBJS)
|
|
40
|
|
41 clean:
|
|
42 rm -f $(OBJS) $(LIB).a $(LIB).so .depend
|
|
43
|
|
44 distclean: clean
|
|
45
|
|
46 dep: depend
|
|
47
|
|
48 depend: .depend
|
|
49
|
|
50 .depend: Makefile config.h
|
|
51 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
|
|
52
|
|
53 #
|
|
54 # include dependency files if they exist
|
|
55 #
|
|
56 ifneq ($(wildcard .depend),)
|
|
57 include .depend
|
|
58 endif
|