makefile.sunos 3.8 KB

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