Add installlib and install-headers targets like everywhere else.
[libav.git] / libavcodec / libpostproc / Makefile
CommitLineData
bba9b16c
MN
1
2include ../../config.mak
3
9a0a8d42
JM
4VPATH=$(SRC_PATH)/libavcodec/libpostproc
5
4bdd05e7 6NAME=postproc
ba64106a 7ifeq ($(BUILD_SHARED),yes)
f3b60109
DB
8LIBVERSION=$(SPPVERSION)
9LIBMAJOR=$(SPPMAJOR)
bba9b16c 10endif
bba9b16c 11
fa30d082
DB
12OBJS=postprocess.o
13SOBJS=postprocess_pic.o
bba9b16c
MN
14
15CFLAGS = $(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:
80581e98 23 $(CC) -c $(CFLAGS) $(LIBOBJFLAGS) -I$(SRC_PATH)/libavcodec -I../.. -o $@ $<
bba9b16c 24
fa30d082 25all: $(SWSLIB) $(LIB) $(SLIBNAME)
bba9b16c
MN
26
27clean:
29a10be0 28 rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
bba9b16c 29
29a10be0 30distclean: clean
04c07634 31 rm -f .depend
bba9b16c
MN
32
33dep: depend
34
35depend:
36 $(CC) -MM $(CFLAGS) postprocess.c 1>.depend
37
ba64106a 38ifeq ($(BUILD_SHARED),yes)
bba9b16c
MN
39postprocess_pic.o: postprocess.c
40 $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $<
41
fa30d082
DB
42$(SLIBNAME): $(SOBJS)
43 $(CC) $(SHFLAGS) -o $(SLIBNAME) $(SOBJS)
bba9b16c
MN
44endif
45
fa30d082 46$(LIB): $(OBJS)
04431ca1 47 rm -f $@
fa30d082 48 $(AR) rc $@ $(OBJS)
04431ca1 49 $(RANLIB) $@
bba9b16c 50
c86eb7ae 51install: all install-headers
ba64106a 52ifeq ($(BUILD_SHARED),yes)
91378af4 53ifeq ($(CONFIG_WIN32),yes)
fa30d082 54 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
91378af4 55else
cc973ecb 56 install -d $(libdir)
f3b60109
DB
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)
f39e56a8 63 $(LDCONFIG) || true
06983da7 64endif
91378af4 65endif
c86eb7ae
DB
66
67installlib: all install-headers
68 install -m 644 $(LIB) "$(libdir)"
69
70install-headers:
bba9b16c 71 mkdir -p $(prefix)/include/postproc
7919d97e 72 install -m 644 $(SRC_PATH)/libavcodec/libpostproc/postprocess.h $(prefix)/include/postproc/postprocess.h
fa30d082
DB
73 install -d $(libdir)/pkgconfig
74 install -m 644 ../../libpostproc.pc $(libdir)/pkgconfig
bba9b16c
MN
75
76
77#
78# include dependency files if they exist
79#
80ifneq ($(wildcard .depend),)
81include .depend
82endif