2001-10-24 09:34:41 +02:00
|
|
|
|
|
|
|
include ../config.mak
|
|
|
|
|
2002-10-28 20:31:04 +01:00
|
|
|
SWSLIB = libswscale.a
|
2002-10-31 11:21:44 +01:00
|
|
|
ifeq ($(SHARED_PP),yes)
|
2002-10-28 20:31:04 +01:00
|
|
|
SPPLIB = libpostproc.so
|
|
|
|
SPPVERSION = 0.0.1
|
2002-10-31 11:21:44 +01:00
|
|
|
endif
|
2002-10-28 20:31:04 +01:00
|
|
|
PPLIB = libpostproc.a
|
2001-10-24 09:34:41 +02:00
|
|
|
|
2002-10-28 20:31:04 +01:00
|
|
|
SWSSRCS=swscale.c rgb2rgb.c yuv2rgb.c
|
|
|
|
SWSOBJS=$(SWSSRCS:.c=.o)
|
|
|
|
PPOBJS=postprocess.o
|
|
|
|
SPPOBJS=postprocess_pic.o
|
2002-06-29 17:01:23 +02:00
|
|
|
CS_TEST_OBJS=cs_test.o rgb2rgb.o ../cpudetect.o ../mp_msg.o
|
2001-10-24 09:34:41 +02:00
|
|
|
|
2002-08-23 01:29:46 +02:00
|
|
|
CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
|
2001-10-24 09:34:41 +02:00
|
|
|
# -I/usr/X11R6/include/
|
|
|
|
|
|
|
|
.SUFFIXES: .c .o
|
|
|
|
|
|
|
|
# .PHONY: all clean
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) -c $(CFLAGS) -o $@ $<
|
|
|
|
|
2002-10-28 20:31:04 +01:00
|
|
|
all: $(SWSLIB) $(PPLIB) $(SPPLIB)
|
2001-10-24 09:34:41 +02:00
|
|
|
|
2002-10-28 20:31:04 +01:00
|
|
|
$(SWSLIB): $(SWSOBJS)
|
|
|
|
$(AR) r $(SWSLIB) $(SWSOBJS)
|
2001-10-24 09:34:41 +02:00
|
|
|
|
|
|
|
clean:
|
2002-10-28 20:31:04 +01:00
|
|
|
rm -f *.o *.a *~ *.so
|
2001-10-24 09:34:41 +02:00
|
|
|
|
|
|
|
distclean:
|
2002-10-28 20:31:04 +01:00
|
|
|
rm -f Makefile.bak *.o *.a *~ *.so .depend
|
2001-10-24 09:34:41 +02:00
|
|
|
|
|
|
|
dep: depend
|
|
|
|
|
|
|
|
depend:
|
|
|
|
$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
|
|
|
|
|
2002-06-29 17:01:23 +02:00
|
|
|
cs_test: $(CS_TEST_OBJS)
|
|
|
|
$(CC) $(CS_TEST_OBJS) -o cs_test
|
|
|
|
|
2002-10-31 11:21:44 +01:00
|
|
|
ifeq ($(SHARED_PP),yes)
|
2002-10-28 20:31:04 +01:00
|
|
|
postprocess_pic.o: postprocess.c
|
2002-10-29 12:21:43 +01:00
|
|
|
$(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -o $@ $<
|
2002-10-28 20:31:04 +01:00
|
|
|
|
|
|
|
$(SPPLIB): $(SPPOBJS)
|
|
|
|
$(CC) -shared -Wl,-soname,$(SPPLIB).0 \
|
|
|
|
-o $(SPPLIB) $(SPPOBJS)
|
2002-10-31 11:21:44 +01:00
|
|
|
endif
|
|
|
|
|
2002-10-28 20:31:04 +01:00
|
|
|
$(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 09:34:41 +02:00
|
|
|
#
|
|
|
|
# include dependency files if they exist
|
|
|
|
#
|
|
|
|
ifneq ($(wildcard .depend),)
|
|
|
|
include .depend
|
|
|
|
endif
|