Separate library install into static and shared installation.
[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
b12f8273
DB
51
52install-lib-shared: $(SLIBNAME)
91378af4 53ifeq ($(CONFIG_WIN32),yes)
fa30d082 54 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
91378af4 55else
f3b60109
DB
56 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
57 $(libdir)/$(SLIBNAME_WITH_VERSION)
58 ln -sf $(SLIBNAME_WITH_VERSION) \
59 $(libdir)/$(SLIBNAME_WITH_MAJOR)
60 ln -sf $(SLIBNAME_WITH_VERSION) \
61 $(libdir)/$(SLIBNAME)
91378af4 62endif
c86eb7ae 63
b12f8273 64install-lib-static: $(LIB)
c86eb7ae
DB
65 install -m 644 $(LIB) "$(libdir)"
66
67install-headers:
bba9b16c 68 mkdir -p $(prefix)/include/postproc
7919d97e 69 install -m 644 $(SRC_PATH)/libavcodec/libpostproc/postprocess.h $(prefix)/include/postproc/postprocess.h
fa30d082
DB
70 install -d $(libdir)/pkgconfig
71 install -m 644 ../../libpostproc.pc $(libdir)/pkgconfig
bba9b16c
MN
72
73
74#
75# include dependency files if they exist
76#
77ifneq ($(wildcard .depend),)
78include .depend
79endif