makefile.sunos 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # makefile for libpng
  2. # Copyright (C) 2002, 2006 Glenn Randers-Pehrson
  3. # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
  4. #
  5. # This code is released under the libpng license.
  6. # For conditions of distribution and use, see the disclaimer
  7. # and license in png.h
  8. # where make install puts libpng.a and png.h
  9. prefix=/usr/local
  10. INCPATH=$(prefix)/include
  11. LIBPATH=$(prefix)/lib
  12. # override DESTDIR= on the make install command line to easily support
  13. # installing into a temporary location. Example:
  14. #
  15. # make install DESTDIR=/tmp/build/libpng
  16. #
  17. # If you're going to install into a temporary location
  18. # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
  19. # you execute make install.
  20. DESTDIR=
  21. # Where the zlib library and include files are located
  22. #ZLIBLIB=/usr/local/lib
  23. #ZLIBINC=/usr/local/include
  24. ZLIBLIB=../zlib
  25. ZLIBINC=../zlib
  26. WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow -Wconversion \
  27. -Wmissing-declarations -Wtraditional -Wcast-align \
  28. -Wstrict-prototypes -Wmissing-prototypes
  29. CC=gcc
  30. AR_RC=ar rc
  31. MKDIR_P=mkdir -p
  32. LN_SF=ln -f -s
  33. RANLIB=ranlib
  34. RM_F=/bin/rm -f
  35. CFLAGS=-I$(ZLIBINC) -O # $(WARNMORE) -DPNG_DEBUG=5
  36. LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
  37. OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
  38. pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
  39. pngwtran.o pngmem.o pngerror.o pngpread.o
  40. all: libpng.a pngtest
  41. # see scripts/pnglibconf.mak for more options
  42. pnglibconf.h: scripts/pnglibconf.h.prebuilt
  43. cp scripts/pnglibconf.h.prebuilt $@
  44. libpng.a: $(OBJS)
  45. $(AR_RC) $@ $(OBJS)
  46. $(RANLIB) $@
  47. pngtest: pngtest.o libpng.a
  48. $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
  49. test: pngtest
  50. ./pngtest
  51. install: libpng.a
  52. -@$(MKDIR_P) $(DESTDIR)$(INCPATH)
  53. -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng
  54. -@$(MKDIR_P) $(DESTDIR)$(LIBPATH)
  55. -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h
  56. -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h
  57. -@$(RM_F) $(DESTDIR)$(INCPATH)/pnglibconf.h
  58. cp png.h $(DESTDIR)$(INCPATH)/libpng
  59. cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
  60. cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng
  61. chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
  62. chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
  63. chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h
  64. (cd $(DESTDIR)$(INCPATH); $(LN_SF) libpng/* .)
  65. cp libpng.a $(DESTDIR)$(LIBPATH)
  66. chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
  67. clean:
  68. $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h
  69. DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
  70. writelock:
  71. chmod a-w *.[ch35] $(DOCS) scripts/*
  72. # DO NOT DELETE THIS LINE -- make depend depends on it.
  73. png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  74. pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  75. pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  76. pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  77. pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  78. pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  79. pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  80. pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  81. pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  82. pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  83. pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  84. pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  85. pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  86. pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  87. pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  88. pngtest.o: png.h pngconf.h pnglibconf.h