2001-10-24 07:34:41 +00:00
|
|
|
|
|
|
|
include ../config.mak
|
|
|
|
|
2002-10-28 19:31:04 +00:00
|
|
|
SWSLIB = libswscale.a
|
|
|
|
SPPLIB = libpostproc.so
|
|
|
|
SPPVERSION = 0.0.1
|
|
|
|
PPLIB = libpostproc.a
|
2001-10-24 07:34:41 +00:00
|
|
|
|
2002-10-28 19:31:04 +00:00
|
|
|
SWSSRCS=swscale.c rgb2rgb.c yuv2rgb.c
|
|
|
|
SWSOBJS=$(SWSSRCS:.c=.o)
|
|
|
|
PPOBJS=postprocess.o
|
|
|
|
SPPOBJS=postprocess_pic.o
|
2002-06-29 15:01:23 +00:00
|
|
|
CS_TEST_OBJS=cs_test.o rgb2rgb.o ../cpudetect.o ../mp_msg.o
|
2001-10-24 07:34:41 +00:00
|
|
|
|
2002-08-22 23:29:46 +00:00
|
|
|
CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
|
2001-10-24 07:34:41 +00:00
|
|
|
# -I/usr/X11R6/include/
|
|
|
|
|
|
|
|
.SUFFIXES: .c .o
|
|
|
|
|
|
|
|
# .PHONY: all clean
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2002-10-28 19:31:04 +00:00
|
|
|
all: $(SWSLIB) $(PPLIB) $(SPPLIB)
|
2001-10-24 07:34:41 +00:00
|
|
|
|
2002-10-28 19:31:04 +00:00
|
|
|
$(SWSLIB): $(SWSOBJS)
|
|
|
|
$(AR) r $(SWSLIB) $(SWSOBJS)
|
2001-10-24 07:34:41 +00:00
|
|
|
|
|
|
|
clean:
|
2002-10-28 19:31:04 +00:00
|
|
|
rm -f *.o *.a *~ *.so
|
2001-10-24 07:34:41 +00:00
|
|
|
|
|
|
|
distclean:
|
2002-10-28 19:31:04 +00:00
|
|
|
rm -f Makefile.bak *.o *.a *~ *.so .depend
|
2001-10-24 07:34:41 +00:00
|
|
|
|
|
|
|
dep: depend
|
|
|
|
|
|
|
|
depend:
|
|
|
|
$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
|
|
|
|
|
2002-06-29 15:01:23 +00:00
|
|
|
cs_test: $(CS_TEST_OBJS)
|
|
|
|
$(CC) $(CS_TEST_OBJS) -o cs_test
|
|
|
|
|
2002-10-28 19:31:04 +00:00
|
|
|
postprocess_pic.o: postprocess.c
|
|
|
|
$(CC) -c $(CFLAGS) -fPIC -DPIC -o $@ $<
|
|
|
|
|
|
|
|
$(SPPLIB): $(SPPOBJS)
|
|
|
|
$(CC) -shared -Wl,-soname,$(SPPLIB).0 \
|
|
|
|
-o $(SPPLIB) $(SPPOBJS)
|
|
|
|
|
|
|
|
$(PPLIB): $(PPOBJS)
|
|
|
|
$(AR) r $(PPLIB) $(PPOBJS)
|
|
|
|
|
|
|
|
install: all
|
|
|
|
ifeq ($(SHARED_PP),yes)
|
|
|
|
install -d $(prefix)/lib
|
|
|
|
install -s -m 755 $(SPPLIB) $(prefix)/lib/$(SPPLIB).$(SPPVERSION)
|
|
|
|
ln -sf $(SPPLIB).$(SPPVERSION) $(prefix)/lib/$(SPPLIB)
|
|
|
|
ldconfig || true
|
|
|
|
mkdir -p $(prefix)/include/postproc
|
|
|
|
install -m 644 postprocess.h $(prefix)/include/postproc/postprocess.h
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2001-10-24 07:34:41 +00:00
|
|
|
#
|
|
|
|
# include dependency files if they exist
|
|
|
|
#
|
|
|
|
ifneq ($(wildcard .depend),)
|
|
|
|
include .depend
|
|
|
|
endif
|