You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.5KB

  1. include ../config.mak
  2. SWSLIB = libswscale.a
  3. ifeq ($(SHARED_PP),yes)
  4. SPPLIB = libpostproc.so
  5. SPPVERSION = 0.0.1
  6. endif
  7. PPLIB = libpostproc.a
  8. SWSSRCS=swscale.c rgb2rgb.c yuv2rgb.c
  9. SWSOBJS=$(SWSSRCS:.c=.o)
  10. PPOBJS=postprocess.o
  11. SPPOBJS=postprocess_pic.o
  12. CS_TEST_OBJS=cs_test.o rgb2rgb.o ../cpudetect.o ../mp_msg.o ../libvo/aclib.o
  13. CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
  14. # -I/usr/X11R6/include/
  15. .SUFFIXES: .c .o
  16. # .PHONY: all clean
  17. .c.o:
  18. $(CC) -c $(CFLAGS) -o $@ $<
  19. all: $(SWSLIB) $(PPLIB) $(SPPLIB)
  20. $(SWSLIB): $(SWSOBJS)
  21. $(AR) r $(SWSLIB) $(SWSOBJS)
  22. clean:
  23. rm -f *.o *.a *~ *.so
  24. distclean:
  25. rm -f Makefile.bak *.o *.a *~ *.so .depend
  26. dep: depend
  27. depend:
  28. $(CC) -MM $(CFLAGS) $(SWSSRCS) postprocess.c 1>.depend
  29. cs_test: $(CS_TEST_OBJS)
  30. $(CC) $(CS_TEST_OBJS) -o cs_test
  31. ifeq ($(SHARED_PP),yes)
  32. postprocess_pic.o: postprocess.c
  33. $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -o $@ $<
  34. $(SPPLIB): $(SPPOBJS)
  35. $(CC) -shared -Wl,-soname,$(SPPLIB).0 \
  36. -o $(SPPLIB) $(SPPOBJS)
  37. endif
  38. $(PPLIB): $(PPOBJS)
  39. $(AR) r $(PPLIB) $(PPOBJS)
  40. install: all
  41. ifeq ($(SHARED_PP),yes)
  42. install -d $(prefix)/lib
  43. install -s -m 755 $(SPPLIB) $(prefix)/lib/$(SPPLIB).$(SPPVERSION)
  44. ln -sf $(SPPLIB).$(SPPVERSION) $(prefix)/lib/$(SPPLIB)
  45. ldconfig || true
  46. mkdir -p $(prefix)/include/postproc
  47. install -m 644 postprocess.h $(prefix)/include/postproc/postprocess.h
  48. endif
  49. #
  50. # include dependency files if they exist
  51. #
  52. ifneq ($(wildcard .depend),)
  53. include .depend
  54. endif