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)
|
|
36
|
|
37 $(LIB).so: $(OBJS)
|
|
38 $(CC) -o $(LIB).so -shared -rdynamic $(OBJS)
|
|
39
|
|
40 clean:
|
|
41 rm -f $(OBJS) $(LIB).a $(LIB).so .depend
|
|
42
|
|
43 distclean: clean
|
|
44
|
|
45 dep: depend
|
|
46
|
|
47 depend: .depend
|
|
48
|
|
49 .depend: Makefile config.h
|
|
50 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
|
|
51
|
|
52 #
|
|
53 # include dependency files if they exist
|
|
54 #
|
|
55 ifneq ($(wildcard .depend),)
|
|
56 include .depend
|
|
57 endif
|