libpostproc installs into a different directory that needs to be created.
[libav.git] / libavcodec / libpostproc / Makefile
1
2 include ../../config.mak
3
4 VPATH=$(SRC_PATH)/libavcodec/libpostproc
5
6 # Overload incdir, postproc include files go in a different directory.
7 incdir=$(prefix)/include/postproc
8
9 NAME=postproc
10 ifeq ($(BUILD_SHARED),yes)
11 LIBVERSION=$(SPPVERSION)
12 LIBMAJOR=$(SPPMAJOR)
13 endif
14
15 OBJS=postprocess.o
16 SOBJS=postprocess_pic.o
17
18 CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
19 # -I/usr/X11R6/include/
20
21 .SUFFIXES: .c .o
22
23 # .PHONY: all clean
24
25 .c.o:
26 $(CC) -c $(CFLAGS) $(LIBOBJFLAGS) -I$(SRC_PATH)/libavcodec -I../.. -o $@ $<
27
28 all: $(SWSLIB) $(LIB) $(SLIBNAME)
29
30 clean:
31 rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
32
33 distclean: clean
34 rm -f .depend
35
36 dep: depend
37
38 depend:
39 $(CC) -MM $(CFLAGS) postprocess.c 1>.depend
40
41 ifeq ($(BUILD_SHARED),yes)
42 postprocess_pic.o: postprocess.c
43 $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $<
44
45 $(SLIBNAME): $(SOBJS)
46 $(CC) $(SHFLAGS) -o $(SLIBNAME) $(SOBJS)
47 endif
48
49 $(LIB): $(OBJS)
50 rm -f $@
51 $(AR) rc $@ $(OBJS)
52 $(RANLIB) $@
53
54
55 install-lib-shared: $(SLIBNAME)
56 ifeq ($(CONFIG_WIN32),yes)
57 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
58 else
59 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
60 $(libdir)/$(SLIBNAME_WITH_VERSION)
61 ln -sf $(SLIBNAME_WITH_VERSION) \
62 $(libdir)/$(SLIBNAME_WITH_MAJOR)
63 ln -sf $(SLIBNAME_WITH_VERSION) \
64 $(libdir)/$(SLIBNAME)
65 endif
66
67 install-lib-static: $(LIB)
68 install -m 644 $(LIB) "$(libdir)"
69
70 install-headers:
71 install -d $(incdir)
72 install -m 644 postprocess.h $(incdir)/postprocess.h
73 install -m 644 $(SRC_PATH)/libpostproc.pc $(libdir)/pkgconfig
74
75
76 #
77 # include dependency files if they exist
78 #
79 ifneq ($(wildcard .depend),)
80 include .depend
81 endif