2001-10-24 07:34:41 +00:00
|
|
|
|
|
|
|
include ../config.mak
|
|
|
|
|
2002-10-28 19:31:04 +00:00
|
|
|
SWSLIB = libswscale.a
|
2002-10-31 10:21:44 +00:00
|
|
|
ifeq ($(SHARED_PP),yes)
|
2002-10-28 19:31:04 +00:00
|
|
|
SPPLIB = libpostproc.so
|
|
|
|
SPPVERSION = 0.0.1
|
2002-10-31 10:21:44 +00:00
|
|
|
endif
|
2002-10-28 19:31:04 +00:00
|
|
|
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:
|
2002-11-04 10:01:15 +00:00
|
|
|
$(CC) -MM $(CFLAGS) $(SWSSRCS) postprocess.c 1>.depend
|
2001-10-24 07:34:41 +00:00
|
|
|
|
2002-06-29 15:01:23 +00:00
|
|
|
cs_test: $(CS_TEST_OBJS)
|
|
|
|
$(CC) $(CS_TEST_OBJS) -o cs_test
|
|
|
|
|
2002-10-31 10:21:44 +00:00
|
|
|
ifeq ($(SHARED_PP),yes)
|
2002-10-28 19:31:04 +00:00
|
|
|
postprocess_pic.o: postprocess.c
|
2002-10-29 11:21:43 +00:00
|
|
|
$(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -o $@ $<
|
2002-10-28 19:31:04 +00:00
|
|
|
|
|
|
|
$(SPPLIB): $(SPPOBJS)
|
|
|
|
$(CC) -shared -Wl,-soname,$(SPPLIB).0 \
|
|
|
|
-o $(SPPLIB) $(SPPOBJS)
|
2002-10-31 10:21:44 +00:00
|
|
|
endif
|
2002-11-04 10:01:15 +00:00
|
|
|
|
2002-10-28 19:31:04 +00: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
|
|
|
|
|
2002-11-04 10:01:15 +00:00
|
|
|
|
2001-10-24 07:34:41 +00:00
|
|
|
#
|
|
|
|
# include dependency files if they exist
|
|
|
|
#
|
|
|
|
ifneq ($(wildcard .depend),)
|
|
|
|
include .depend
|
|
|
|
endif
|