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 16 # Location of the zlib library and include files 17 ZLIBINC = ../zlib 18 ZLIBLIB = ../zlib 19 20 # Compiler, linker, lib and other tools 21 CC = icc 22 LD = ilink 23 AR = ilib 24 CP = copy 25 RM = del 26 27 CPPFLAGS = -I$(ZLIBINC) 28 CFLAGS = -Mc -O2 -W3 29 LDFLAGS = 30 31 # Pre-built configuration 32 # See scripts/pnglibconf.mak for more options 33 PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt 34 35 # File extensions 36 O=.obj 37 A=.lib 38 E=.exe 39 40 # Variables 41 OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \ 42 pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \ 43 pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) 44 45 LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A) 46 47 # Targets 48 .c$(O): 49 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< 50 51 all: libpng$(A) pngtest$(E) 52 53 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) 54 $(CP) $(PNGLIBCONF_H_PREBUILT) $@ 55 56 libpng$(A): $(OBJS) 57 $(AR) -out:$@ $(OBJS) 58 59 test: pngtest$(E) 60 pngtest$(E) 61 62 pngtest: pngtest$(E) 63 64 pngtest$(E): pngtest$(O) libpng$(A) 65 $(LD) $(LDFLAGS) pngtest$(O) $(LIBS) 66 67 clean: 68 $(RM) *$(O) 69 $(RM) libpng$(A) 70 $(RM) pnglibconf.h 71 $(RM) pngtest$(E) 72 $(RM) pngout.png 73 74 png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 75 pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 76 pngget$(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 pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 79 pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 80 pngrio$(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 pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 84 pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 85 pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 86 pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 87 pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 88 pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h 89 90 pngtest$(O): png.h pngconf.h pnglibconf.h 91