makefile.sunos 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # makefile for libpng
  2. # Copyright (C) 2002, 2006, 2014 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. CP=cp
  35. RM_F=/bin/rm -f
  36. CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
  37. CFLAGS=-O # $(WARNMORE)
  38. LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
  39. # Pre-built configuration
  40. # See scripts/pnglibconf.mak for more options
  41. PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
  42. OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
  43. pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
  44. pngwtran.o pngmem.o pngerror.o pngpread.o
  45. .c.o:
  46. $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
  47. all: libpng.a pngtest
  48. pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
  49. $(CP) $(PNGLIBCONF_H_PREBUILT) $@
  50. libpng.a: $(OBJS)
  51. $(AR_RC) $@ $(OBJS)
  52. $(RANLIB) $@
  53. pngtest: pngtest.o libpng.a
  54. $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
  55. test: pngtest
  56. ./pngtest
  57. install: libpng.a
  58. -@$(MKDIR_P) $(DESTDIR)$(INCPATH)
  59. -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng
  60. -@$(MKDIR_P) $(DESTDIR)$(LIBPATH)
  61. -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h
  62. -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h
  63. -@$(RM_F) $(DESTDIR)$(INCPATH)/pnglibconf.h
  64. cp png.h $(DESTDIR)$(INCPATH)/libpng
  65. cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
  66. cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng
  67. chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
  68. chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
  69. chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h
  70. (cd $(DESTDIR)$(INCPATH); $(LN_SF) libpng/* .)
  71. cp libpng.a $(DESTDIR)$(LIBPATH)
  72. chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
  73. clean:
  74. $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h
  75. DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
  76. writelock:
  77. chmod a-w *.[ch35] $(DOCS) scripts/*
  78. # DO NOT DELETE THIS LINE -- make depend depends on it.
  79. png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  80. pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  81. pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  82. pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  83. pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  84. pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  85. pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  86. pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  87. pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  88. pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  89. pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  90. pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  91. pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  92. pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  93. pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  94. pngtest.o: png.h pngconf.h pnglibconf.h