-fomit-frame-pointer is needed for the PIC code
[libav.git] / postproc / Makefile
1
2 include ../config.mak
3
4 SWSLIB = libswscale.a
5 SPPLIB = libpostproc.so
6 SPPVERSION = 0.0.1
7 PPLIB = libpostproc.a
8
9 SWSSRCS=swscale.c rgb2rgb.c yuv2rgb.c
10 SWSOBJS=$(SWSSRCS:.c=.o)
11 PPOBJS=postprocess.o
12 SPPOBJS=postprocess_pic.o
13 CS_TEST_OBJS=cs_test.o rgb2rgb.o ../cpudetect.o ../mp_msg.o
14
15 CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
16 # -I/usr/X11R6/include/
17
18 .SUFFIXES: .c .o
19
20 # .PHONY: all clean
21
22 .c.o:
23 $(CC) -c $(CFLAGS) -o $@ $<
24
25 all: $(SWSLIB) $(PPLIB) $(SPPLIB)
26
27 $(SWSLIB): $(SWSOBJS)
28 $(AR) r $(SWSLIB) $(SWSOBJS)
29
30 clean:
31 rm -f *.o *.a *~ *.so
32
33 distclean:
34 rm -f Makefile.bak *.o *.a *~ *.so .depend
35
36 dep: depend
37
38 depend:
39 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
40
41 cs_test: $(CS_TEST_OBJS)
42 $(CC) $(CS_TEST_OBJS) -o cs_test
43
44 postprocess_pic.o: postprocess.c
45 $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -o $@ $<
46
47 $(SPPLIB): $(SPPOBJS)
48 $(CC) -shared -Wl,-soname,$(SPPLIB).0 \
49 -o $(SPPLIB) $(SPPOBJS)
50
51 $(PPLIB): $(PPOBJS)
52 $(AR) r $(PPLIB) $(PPOBJS)
53
54 install: all
55 ifeq ($(SHARED_PP),yes)
56 install -d $(prefix)/lib
57 install -s -m 755 $(SPPLIB) $(prefix)/lib/$(SPPLIB).$(SPPVERSION)
58 ln -sf $(SPPLIB).$(SPPVERSION) $(prefix)/lib/$(SPPLIB)
59 ldconfig || true
60 mkdir -p $(prefix)/include/postproc
61 install -m 644 postprocess.h $(prefix)/include/postproc/postprocess.h
62 endif
63
64
65 #
66 # include dependency files if they exist
67 #
68 ifneq ($(wildcard .depend),)
69 include .depend
70 endif