Create symbolic links for all library sonames and clean up Makefiles.
[libav.git] / libavcodec / libpostproc / Makefile
CommitLineData
bba9b16c
MN
1
2include ../../config.mak
3
9a0a8d42
JM
4VPATH=$(SRC_PATH)/libavcodec/libpostproc
5
fa30d082 6LIB = $(LIBPREF)postproc$(LIBSUF)
bba9b16c 7ifeq ($(SHARED_PP),yes)
f3b60109
DB
8LIBVERSION=$(SPPVERSION)
9LIBMAJOR=$(SPPMAJOR)
10NAME=postproc
fb3d46da 11SLIBNAME = $(SLIBPREF)postproc$(SLIBSUF)
bba9b16c 12endif
bba9b16c 13
fa30d082
DB
14OBJS=postprocess.o
15SOBJS=postprocess_pic.o
bba9b16c
MN
16
17CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
18# -I/usr/X11R6/include/
19
20.SUFFIXES: .c .o
21
22# .PHONY: all clean
23
24.c.o:
80581e98 25 $(CC) -c $(CFLAGS) $(LIBOBJFLAGS) -I$(SRC_PATH)/libavcodec -I../.. -o $@ $<
bba9b16c 26
fa30d082 27all: $(SWSLIB) $(LIB) $(SLIBNAME)
bba9b16c
MN
28
29clean:
fa30d082 30 rm -f *.o *.a *~ *$(SLIBSUF) $(LIB) $(SLIBNAME)
bba9b16c
MN
31
32distclean:
4e159595 33 rm -f Makefile.bak *.o *.a *~ *$(SLIBSUF) .depend
bba9b16c
MN
34
35dep: depend
36
37depend:
38 $(CC) -MM $(CFLAGS) postprocess.c 1>.depend
39
40ifeq ($(SHARED_PP),yes)
41postprocess_pic.o: postprocess.c
42 $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $<
43
fa30d082
DB
44$(SLIBNAME): $(SOBJS)
45 $(CC) $(SHFLAGS) -o $(SLIBNAME) $(SOBJS)
bba9b16c
MN
46endif
47
fa30d082 48$(LIB): $(OBJS)
04431ca1 49 rm -f $@
fa30d082 50 $(AR) rc $@ $(OBJS)
04431ca1 51 $(RANLIB) $@
bba9b16c
MN
52
53install: all
54ifeq ($(SHARED_PP),yes)
91378af4 55ifeq ($(CONFIG_WIN32),yes)
fa30d082 56 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
91378af4 57else
cc973ecb 58 install -d $(libdir)
f3b60109
DB
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)
f39e56a8 65 $(LDCONFIG) || true
06983da7 66endif
91378af4 67endif
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