The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1 | # Makefile for libpng (static) |
| 2 | # IBM C version 3.x for Win32 and OS/2 |
Sireesh Tripurari | b478e66 | 2014-05-09 15:15:10 +0530 | [diff] [blame] | 3 | # Copyright (C) 2006, 2014 Glenn Randers-Pehrson |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4 | # Copyright (C) 2000 Cosmin Truta |
Patrick Scott | 5f6bd84 | 2010-06-28 16:55:16 -0400 | [diff] [blame] | 5 | # |
Patrick Scott | a0bb96c | 2009-07-22 11:50:02 -0400 | [diff] [blame] | 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 |
Patrick Scott | 5f6bd84 | 2010-06-28 16:55:16 -0400 | [diff] [blame] | 9 | # |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 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 |
Matt Sarett | 96be908 | 2016-05-03 13:29:54 -0400 | [diff] [blame^] | 24 | CP = copy |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 25 | RM = del |
| 26 | |
Sireesh Tripurari | b478e66 | 2014-05-09 15:15:10 +0530 | [diff] [blame] | 27 | CPPFLAGS = -I$(ZLIBINC) |
| 28 | CFLAGS = -Mc -O2 -W3 |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 29 | LDFLAGS = |
| 30 | |
Matt Sarett | 96be908 | 2016-05-03 13:29:54 -0400 | [diff] [blame^] | 31 | # Pre-built configuration |
| 32 | # See scripts/pnglibconf.mak for more options |
| 33 | PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt |
| 34 | |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 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 |
Sireesh Tripurari | b478e66 | 2014-05-09 15:15:10 +0530 | [diff] [blame] | 48 | .c$(O): |
| 49 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $< |
| 50 | |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 51 | all: libpng$(A) pngtest$(E) |
| 52 | |
Matt Sarett | 96be908 | 2016-05-03 13:29:54 -0400 | [diff] [blame^] | 53 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) |
| 54 | $(CP) $(PNGLIBCONF_H_PREBUILT) $@ |
Chris Craik | b50c217 | 2013-07-29 15:28:30 -0700 | [diff] [blame] | 55 | |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 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) |
Chris Craik | b50c217 | 2013-07-29 15:28:30 -0700 | [diff] [blame] | 70 | $(RM) pnglibconf.h |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 71 | $(RM) pngtest$(E) |
| 72 | $(RM) pngout.png |
| 73 | |
Sireesh Tripurari | b478e66 | 2014-05-09 15:15:10 +0530 | [diff] [blame] | 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 |
Patrick Scott | a0bb96c | 2009-07-22 11:50:02 -0400 | [diff] [blame] | 89 | |
Chris Craik | b50c217 | 2013-07-29 15:28:30 -0700 | [diff] [blame] | 90 | pngtest$(O): png.h pngconf.h pnglibconf.h |