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.

71 lines
1.4KB

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