Glenn Randers-Pehrson | 68ea243 | 2000-04-01 21:10:05 -0600 | [diff] [blame] | 1 | # Makefile for libpng (static) |
| 2 | # IBM C version 3.x for Win32 and OS/2 |
Glenn Randers-Pehrson | b3870ab | 2006-05-11 09:43:09 -0500 | [diff] [blame] | 3 | # Copyright (C) 2006 Glenn Randers-Pehrson |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 4 | # Copyright (C) 2000 Cosmin Truta |
Glenn Randers-Pehrson | 3e61d79 | 2009-06-24 09:31:28 -0500 | [diff] [blame] | 5 | # |
Glenn Randers-Pehrson | bfbf865 | 2009-06-26 21:46:52 -0500 | [diff] [blame] | 6 | # This code is released under the libpng license. |
Glenn Randers-Pehrson | c332bbc | 2009-06-25 13:43:50 -0500 | [diff] [blame] | 7 | # For conditions of distribution and use, see the disclaimer |
Glenn Randers-Pehrson | 037023b | 2009-06-24 10:27:36 -0500 | [diff] [blame] | 8 | # and license in png.h |
Glenn Randers-Pehrson | 3e61d79 | 2009-06-24 09:31:28 -0500 | [diff] [blame] | 9 | # |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 10 | # Notes: |
| 11 | # Derived from makefile.std |
| 12 | # All modules are compiled in C mode |
Glenn Randers-Pehrson | b182893 | 2001-06-23 08:03:17 -0500 | [diff] [blame] | 13 | # Tested under Win32, expected to work under OS/2 |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 14 | # Can be easily adapted for IBM VisualAge/C++ for AIX |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 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 | RM = del |
| 25 | |
Glenn Randers-Pehrson | 03f9b02 | 2009-12-04 08:40:41 -0600 | [diff] [blame] | 26 | CFLAGS = -I$(ZLIBINC) -Mc -O2 -W3 |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 27 | LDFLAGS = |
| 28 | |
| 29 | # File extensions |
| 30 | O=.obj |
| 31 | A=.lib |
| 32 | E=.exe |
| 33 | |
| 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) \ |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 37 | pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 38 | |
| 39 | LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A) |
| 40 | |
| 41 | # Targets |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 42 | all: libpng$(A) pngtest$(E) |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 43 | |
Glenn Randers-Pehrson | 7253144 | 2010-04-17 08:17:51 -0500 | [diff] [blame] | 44 | # see scripts/pnglibconf.mak for more options |
Glenn Randers-Pehrson | 8c66786 | 2010-08-24 16:16:35 -0500 | [diff] [blame] | 45 | pnglibconf.h: scripts/pnglibconf.h.prebuilt |
| 46 | cp scripts/pnglibconf.h.prebuilt $@ |
Glenn Randers-Pehrson | 7253144 | 2010-04-17 08:17:51 -0500 | [diff] [blame] | 47 | |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 48 | libpng$(A): $(OBJS) |
Glenn Randers-Pehrson | 5b5dcf8 | 2004-07-17 22:45:44 -0500 | [diff] [blame] | 49 | $(AR) -out:$@ $(OBJS) |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 50 | |
| 51 | test: pngtest$(E) |
| 52 | pngtest$(E) |
| 53 | |
| 54 | pngtest: pngtest$(E) |
| 55 | |
| 56 | pngtest$(E): pngtest$(O) libpng$(A) |
| 57 | $(LD) $(LDFLAGS) pngtest$(O) $(LIBS) |
| 58 | |
| 59 | clean: |
| 60 | $(RM) *$(O) |
| 61 | $(RM) libpng$(A) |
Glenn Randers-Pehrson | 7253144 | 2010-04-17 08:17:51 -0500 | [diff] [blame] | 62 | $(RM) pnglibconf.h |
Glenn Randers-Pehrson | 520a764 | 2000-03-21 05:13:06 -0600 | [diff] [blame] | 63 | $(RM) pngtest$(E) |
| 64 | $(RM) pngout.png |
| 65 | |
Glenn Randers-Pehrson | 7253144 | 2010-04-17 08:17:51 -0500 | [diff] [blame] | 66 | png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 67 | pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 68 | pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 69 | pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 70 | pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 71 | pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 72 | pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 73 | pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 74 | pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 75 | pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 76 | pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 77 | pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 78 | pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 79 | pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 80 | pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 81 | |
Glenn Randers-Pehrson | 7253144 | 2010-04-17 08:17:51 -0500 | [diff] [blame] | 82 | pngtest$(O): png.h pngconf.h pnglibconf.h |