Fix bugs in previous commit that caused FTBFS in synfig and ETL FTBFS with older...
[synfig.git] / synfig-core / tags / synfig_0_61_03 / synfig-core / src / modules / mod_libavcodec / libavcodec / libpostproc / Makefile
1
2 include ../../config.mak
3
4 ifeq ($(SHARED_PP),yes)
5 SPPLIB = libpostproc.so
6 SPPVERSION = 0.0.1
7 endif
8 PPLIB = libpostproc.a
9
10 PPOBJS=postprocess.o
11 SPPOBJS=postprocess_pic.o
12
13 CFLAGS  = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
14 # -I/usr/X11R6/include/
15
16 .SUFFIXES: .c .o
17
18 # .PHONY: all clean
19
20 .c.o:
21         $(CC) -c $(CFLAGS) -I.. -I../.. -o $@ $<
22
23 all:    $(SWSLIB) $(PPLIB) $(SPPLIB)
24
25 clean:
26         rm -f *.o *.a *~ *.so
27
28 distclean:
29         rm -f Makefile.bak *.o *.a *~ *.so .depend
30
31 dep:    depend
32
33 depend:
34         $(CC) -MM $(CFLAGS) postprocess.c 1>.depend
35
36 ifeq ($(SHARED_PP),yes)
37 postprocess_pic.o: postprocess.c
38         $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $<
39
40 $(SPPLIB): $(SPPOBJS)
41         $(CC) -shared -Wl,-soname,$(SPPLIB).0 \
42         -o $(SPPLIB) $(SPPOBJS)
43 endif
44
45 $(PPLIB): $(PPOBJS)
46         rm -f $@
47         $(AR) rc $@ $(PPOBJS)
48         $(RANLIB) $@
49
50 install: all
51 ifeq ($(SHARED_PP),yes)
52         install -d $(prefix)/lib
53         install -s -m 755 $(SPPLIB) $(prefix)/lib/$(SPPLIB).$(SPPVERSION)
54         ln -sf $(SPPLIB).$(SPPVERSION) $(prefix)/lib/$(SPPLIB)
55         ldconfig || true
56         mkdir -p $(prefix)/include/postproc
57         install -m 644 postprocess.h $(prefix)/include/postproc/postprocess.h
58 endif
59
60
61 #
62 # include dependency files if they exist
63 #
64 ifneq ($(wildcard .depend),)
65 include .depend
66 endif