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.

67 lines
1.2KB

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