makefile.ibmc 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Makefile for libpng (static)
  2. # IBM C version 3.x for Win32 and OS/2
  3. # Copyright (C) 2006, 2014 Glenn Randers-Pehrson
  4. # Copyright (C) 2000 Cosmin Truta
  5. #
  6. # This code is released under the libpng license.
  7. # For conditions of distribution and use, see the disclaimer
  8. # and license in png.h
  9. #
  10. # Notes:
  11. # Derived from makefile.std
  12. # All modules are compiled in C mode
  13. # Tested under Win32, expected to work under OS/2
  14. # Can be easily adapted for IBM VisualAge/C++ for AIX
  15. # Location of the zlib library and include files
  16. ZLIBINC = ../zlib
  17. ZLIBLIB = ../zlib
  18. # Compiler, linker, lib and other tools
  19. CC = icc
  20. LD = ilink
  21. AR = ilib
  22. CP = copy
  23. RM = del
  24. CPPFLAGS = -I$(ZLIBINC)
  25. CFLAGS = -Mc -O2 -W3
  26. LDFLAGS =
  27. # Pre-built configuration
  28. # See scripts/pnglibconf.mak for more options
  29. PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
  30. # File extensions
  31. O=.obj
  32. A=.lib
  33. E=.exe
  34. # Variables
  35. OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
  36. pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
  37. pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
  38. LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
  39. # Targets
  40. .c$(O):
  41. $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
  42. all: libpng$(A) pngtest$(E)
  43. pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
  44. $(CP) $(PNGLIBCONF_H_PREBUILT) $@
  45. libpng$(A): $(OBJS)
  46. $(AR) -out:$@ $(OBJS)
  47. test: pngtest$(E)
  48. pngtest$(E)
  49. pngtest: pngtest$(E)
  50. pngtest$(E): pngtest$(O) libpng$(A)
  51. $(LD) $(LDFLAGS) pngtest$(O) $(LIBS)
  52. clean:
  53. $(RM) *$(O)
  54. $(RM) libpng$(A)
  55. $(RM) pnglibconf.h
  56. $(RM) pngtest$(E)
  57. $(RM) pngout.png
  58. png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  59. pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  60. pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  61. pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  62. pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  63. pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  64. pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  65. pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  66. pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  67. pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  68. pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  69. pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  70. pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  71. pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  72. pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  73. pngtest$(O): png.h pngconf.h pnglibconf.h