makefile.aix 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. # makefile for libpng using gcc (generic, static library)
  2. # Copyright (C) 2002, 2006-2009 Glenn Randers-Pehrson
  3. # Copyright (C) 2000 Cosmin Truta
  4. # Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
  5. # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
  6. #
  7. # This code is released under the libpng license.
  8. # For conditions of distribution and use, see the disclaimer
  9. # and license in png.h
  10. # Location of the zlib library and include files
  11. ZLIBINC = ../zlib
  12. ZLIBLIB = ../zlib
  13. # Compiler, linker, lib and other tools
  14. CC = gcc
  15. LD = $(CC)
  16. AR_RC = ar rcs
  17. MKDIR_P = mkdir -p
  18. RANLIB = ranlib
  19. RM_F = rm -f
  20. LN_SF = ln -f -s
  21. LIBNAME=libpng15
  22. PNGMAJ = 15
  23. prefix=/usr/local
  24. INCPATH=$(prefix)/include
  25. LIBPATH=$(prefix)/lib
  26. # override DESTDIR= on the make install command line to easily support
  27. # installing into a temporary location. Example:
  28. #
  29. # make install DESTDIR=/tmp/build/libpng
  30. #
  31. # If you're going to install into a temporary location
  32. # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
  33. # you execute make install.
  34. DESTDIR=
  35. DI=$(DESTDIR)$(INCPATH)
  36. DL=$(DESTDIR)$(LIBPATH)
  37. CDEBUG = -g -DPNG_DEBUG=5
  38. LDDEBUG =
  39. CRELEASE = -O2
  40. LDRELEASE = -s
  41. WARNMORE=-W -Wall
  42. CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE)
  43. LDFLAGS = -L. -L$(ZLIBLIB) -lpng15 -lz -lm $(LDRELEASE)
  44. # File extensions
  45. O=.o
  46. A=.a
  47. E=
  48. # Variables
  49. OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
  50. pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
  51. pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
  52. # Targets
  53. all: $(LIBNAME)$(A) pngtest$(E)
  54. include scripts/pnglibconf.mak
  55. REMOVE = $(RM_F)
  56. DFNFLAGS = $(DEFS) $(CPPFLAGS)
  57. $(LIBNAME)$(A): $(OBJS)
  58. $(AR_RC) $@ $(OBJS)
  59. $(RANLIB) $@
  60. test: pngtest$(E)
  61. ./pngtest$(E)
  62. pngtest$(E): pngtest$(O) $(LIBNAME)$(A)
  63. $(LD) -o $@ pngtest$(O) $(LDFLAGS)
  64. install: $(LIBNAME)$(A)
  65. -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
  66. -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
  67. -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
  68. -@$(RM_F) $(DI)/$(LIBNAME)/png.h
  69. -@$(RM_F) $(DI)/$(LIBNAME)/pngconf.h
  70. -@$(RM_F) $(DI)/$(LIBNAME)/pnglibconf.h
  71. -@$(RM_F) $(DI)/png.h
  72. -@$(RM_F) $(DI)/pngconf.h
  73. -@$(RM_F) $(DI)/pnglibconf.h
  74. cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
  75. chmod 644 $(DI)/$(LIBNAME)/png.h \
  76. $(DI)/$(LIBNAME)/pngconf.h \
  77. $(DI)/$(LIBNAME)/pnglibconf.h
  78. -@$(RM_F) -r $(DI)/libpng
  79. (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
  80. -@$(RM_F) $(DL)/$(LIBNAME)$(A)
  81. -@$(RM_F) $(DL)/libpng$(A)
  82. cp $(LIBNAME)$(A) $(DL)/$(LIBNAME)$(A)
  83. chmod 644 $(DL)/$(LIBNAME)$(A)
  84. (cd $(DL); $(LN_SF) $(LIBNAME)$(A) libpng$(A))
  85. (cd $(DI); $(LN_SF) libpng/* .;)
  86. clean:
  87. $(RM_F) *.o $(LIBNAME)$(A) pngtest pngout.png pnglibconf.h
  88. png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  89. pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  90. pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  91. pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  92. pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  93. pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  94. pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  95. pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  96. pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  97. pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  98. pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  99. pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  100. pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  101. pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  102. pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  103. pngtest$(O): png.h pngconf.h pnglibconf.h