8f32bb62f4b7d9f24ad8522de08e387defd0b161
[libav.git] / libavcodec / libpostproc / Makefile
1
2 include ../../config.mak
3
4 VPATH=$(SRC_PATH)/libavcodec/libpostproc
5
6 NAME=postproc
7 ifeq ($(BUILD_SHARED),yes)
8 LIBVERSION=$(SPPVERSION)
9 LIBMAJOR=$(SPPMAJOR)
10 endif
11
12 OBJS=postprocess.o
13 SOBJS=postprocess_pic.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) $(LIBOBJFLAGS) -I$(SRC_PATH)/libavcodec -I../.. -o $@ $<
24
25 all: $(SWSLIB) $(LIB) $(SLIBNAME)
26
27 clean:
28 rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
29
30 distclean: clean
31 rm -f .depend
32
33 dep: depend
34
35 depend:
36 $(CC) -MM $(CFLAGS) postprocess.c 1>.depend
37
38 ifeq ($(BUILD_SHARED),yes)
39 postprocess_pic.o: postprocess.c
40 $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $<
41
42 $(SLIBNAME): $(SOBJS)
43 $(CC) $(SHFLAGS) -o $(SLIBNAME) $(SOBJS)
44 endif
45
46 $(LIB): $(OBJS)
47 rm -f $@
48 $(AR) rc $@ $(OBJS)
49 $(RANLIB) $@
50
51 install: all
52 ifeq ($(BUILD_SHARED),yes)
53 ifeq ($(CONFIG_WIN32),yes)
54 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
55 else
56 install -d $(libdir)
57 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
58 $(libdir)/$(SLIBNAME_WITH_VERSION)
59 ln -sf $(SLIBNAME_WITH_VERSION) \
60 $(libdir)/$(SLIBNAME_WITH_MAJOR)
61 ln -sf $(SLIBNAME_WITH_VERSION) \
62 $(libdir)/$(SLIBNAME)
63 $(LDCONFIG) || true
64 endif
65 endif
66
67 installlib: all
68 install -m 644 $(LIB) "$(libdir)"
69
70 install-headers:
71 mkdir -p $(prefix)/include/postproc
72 install -m 644 $(SRC_PATH)/libavcodec/libpostproc/postprocess.h $(prefix)/include/postproc/postprocess.h
73 install -d $(libdir)/pkgconfig
74 install -m 644 ../../libpostproc.pc $(libdir)/pkgconfig
75
76
77 #
78 # include dependency files if they exist
79 #
80 ifneq ($(wildcard .depend),)
81 include .depend
82 endif