-fomit-frame-pointer is needed for the PIC code
[libav.git] / postproc / Makefile
CommitLineData
44d01eea
NK
1
2include ../config.mak
3
9c9e467d
MN
4SWSLIB = libswscale.a
5SPPLIB = libpostproc.so
6SPPVERSION = 0.0.1
7PPLIB = libpostproc.a
44d01eea 8
9c9e467d
MN
9SWSSRCS=swscale.c rgb2rgb.c yuv2rgb.c
10SWSOBJS=$(SWSSRCS:.c=.o)
11PPOBJS=postprocess.o
12SPPOBJS=postprocess_pic.o
a28ea2c0 13CS_TEST_OBJS=cs_test.o rgb2rgb.o ../cpudetect.o ../mp_msg.o
44d01eea 14
b77eec85 15CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
44d01eea
NK
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
9c9e467d 25all: $(SWSLIB) $(PPLIB) $(SPPLIB)
44d01eea 26
9c9e467d
MN
27$(SWSLIB): $(SWSOBJS)
28 $(AR) r $(SWSLIB) $(SWSOBJS)
44d01eea
NK
29
30clean:
9c9e467d 31 rm -f *.o *.a *~ *.so
44d01eea
NK
32
33distclean:
9c9e467d 34 rm -f Makefile.bak *.o *.a *~ *.so .depend
44d01eea
NK
35
36dep: depend
37
38depend:
39 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
40
a28ea2c0
MN
41cs_test: $(CS_TEST_OBJS)
42 $(CC) $(CS_TEST_OBJS) -o cs_test
43
9c9e467d 44postprocess_pic.o: postprocess.c
9d947f19 45 $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -o $@ $<
9c9e467d
MN
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
54install: all
55ifeq ($(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
62endif
63
64
44d01eea
NK
65#
66# include dependency files if they exist
67#
68ifneq ($(wildcard .depend),)
69include .depend
70endif