Statistics
| Branch: | Revision:

ffmpeg / postproc / Makefile @ 1609f668

History | View | Annotate | Download (1.42 KB)

1

    
2
include ../config.mak
3

    
4
SWSLIB = libswscale.a
5
ifeq ($(SHARED_PP),yes)
6
SPPLIB = libpostproc.so
7
SPPVERSION = 0.0.1
8
endif
9
PPLIB = libpostproc.a
10

    
11
SWSSRCS=swscale.c rgb2rgb.c yuv2rgb.c
12
SWSOBJS=$(SWSSRCS:.c=.o)
13
PPOBJS=postprocess.o
14
SPPOBJS=postprocess_pic.o
15
CS_TEST_OBJS=cs_test.o rgb2rgb.o ../cpudetect.o ../mp_msg.o
16

    
17
CFLAGS  = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
18
# -I/usr/X11R6/include/
19

    
20
.SUFFIXES: .c .o
21

    
22
# .PHONY: all clean
23

    
24
.c.o:
25
	$(CC) -c $(CFLAGS) -o $@ $<
26

    
27
all:    $(SWSLIB) $(PPLIB) $(SPPLIB)
28

    
29
$(SWSLIB):     $(SWSOBJS)
30
	$(AR) r $(SWSLIB) $(SWSOBJS)
31

    
32
clean:
33
	rm -f *.o *.a *~ *.so
34

    
35
distclean:
36
	rm -f Makefile.bak *.o *.a *~ *.so .depend
37

    
38
dep:    depend
39

    
40
depend:
41
	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
42

    
43
cs_test: $(CS_TEST_OBJS)
44
	$(CC) $(CS_TEST_OBJS) -o cs_test
45

    
46
ifeq ($(SHARED_PP),yes)
47
postprocess_pic.o: postprocess.c
48
	$(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -o $@ $<
49

    
50
$(SPPLIB): $(SPPOBJS)
51
	$(CC) -shared -Wl,-soname,$(SPPLIB).0 \
52
	-o $(SPPLIB) $(SPPOBJS)
53
endif
54
	
55
$(PPLIB): $(PPOBJS)
56
	$(AR) r $(PPLIB) $(PPOBJS)
57

    
58
install: all
59
ifeq ($(SHARED_PP),yes)
60
	install -d $(prefix)/lib
61
	install -s -m 755 $(SPPLIB) $(prefix)/lib/$(SPPLIB).$(SPPVERSION)
62
	ln -sf $(SPPLIB).$(SPPVERSION) $(prefix)/lib/$(SPPLIB)
63
	ldconfig || true
64
	mkdir -p $(prefix)/include/postproc
65
	install -m 644 postprocess.h $(prefix)/include/postproc/postprocess.h
66
endif
67

    
68
	
69
#
70
# include dependency files if they exist
71
#
72
ifneq ($(wildcard .depend),)
73
include .depend
74
endif