Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 1 | # makefile for libpng |
| 2 | # Copyright (C) 1998 Tim Wegner |
Glenn Randers-Pehrson | 5af0307 | 2014-01-20 12:36:30 -0600 | [diff] [blame] | 3 | # Copyright (C) 2006,2009,2011,2014 Glenn Randers-Pehrson |
Glenn Randers-Pehrson | 3e61d79 | 2009-06-24 09:31:28 -0500 | [diff] [blame] | 4 | # |
Glenn Randers-Pehrson | bfbf865 | 2009-06-26 21:46:52 -0500 | [diff] [blame] | 5 | # This code is released under the libpng license. |
Glenn Randers-Pehrson | c332bbc | 2009-06-25 13:43:50 -0500 | [diff] [blame] | 6 | # For conditions of distribution and use, see the disclaimer |
Glenn Randers-Pehrson | 037023b | 2009-06-24 10:27:36 -0500 | [diff] [blame] | 7 | # and license in png.h |
Glenn Randers-Pehrson | 3e61d79 | 2009-06-24 09:31:28 -0500 | [diff] [blame] | 8 | # |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 9 | # Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib |
Glenn Randers-Pehrson | bcfd15d | 1999-10-01 14:22:25 -0500 | [diff] [blame] | 10 | # To use, do "nmake /f scripts\makefile.vcwin32" |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 11 | |
Cosmin Truta | 82200da | 2014-03-22 09:29:59 -0500 | [diff] [blame] | 12 | # -------- Microsoft Visual C++ 2.0 and later -------- |
Glenn Randers-Pehrson | bcfd15d | 1999-10-01 14:22:25 -0500 | [diff] [blame] | 13 | |
Cosmin Truta | 82200da | 2014-03-22 09:29:59 -0500 | [diff] [blame] | 14 | # Compiler, linker, librarian and other tools |
Glenn Randers-Pehrson | 5b5dcf8 | 2004-07-17 22:45:44 -0500 | [diff] [blame] | 15 | CC = cl |
| 16 | LD = link |
| 17 | AR = lib |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 18 | CPPFLAGS = -I..\zlib |
| 19 | CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -MD -O2 -W3 |
Glenn Randers-Pehrson | 5b5dcf8 | 2004-07-17 22:45:44 -0500 | [diff] [blame] | 20 | LDFLAGS = -nologo |
| 21 | ARFLAGS = -nologo |
Cosmin Truta | 82200da | 2014-03-22 09:29:59 -0500 | [diff] [blame] | 22 | CP = copy |
Glenn Randers-Pehrson | 5b5dcf8 | 2004-07-17 22:45:44 -0500 | [diff] [blame] | 23 | RM = del |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 24 | |
Cosmin Truta | 9ab7b4c | 2014-03-22 13:13:11 -0500 | [diff] [blame] | 25 | # Pre-built configuration |
| 26 | # See scripts/pnglibconf.mak for more options |
| 27 | PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt |
| 28 | |
Glenn Randers-Pehrson | 5b5dcf8 | 2004-07-17 22:45:44 -0500 | [diff] [blame] | 29 | # File extensions |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 30 | O=.obj |
| 31 | |
| 32 | #uncomment next to put error messages in a file |
Glenn Randers-Pehrson | 5b5dcf8 | 2004-07-17 22:45:44 -0500 | [diff] [blame] | 33 | #ERRFILE= >> pngerrs.log |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 34 | |
Glenn Randers-Pehrson | 5b5dcf8 | 2004-07-17 22:45:44 -0500 | [diff] [blame] | 35 | # Variables |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 36 | OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) |
Glenn Randers-Pehrson | 5b5dcf8 | 2004-07-17 22:45:44 -0500 | [diff] [blame] | 37 | OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) |
| 38 | OBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) |
| 39 | OBJS = $(OBJS1) $(OBJS2) $(OBJS3) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 40 | |
Glenn Randers-Pehrson | 5b5dcf8 | 2004-07-17 22:45:44 -0500 | [diff] [blame] | 41 | # Targets |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 42 | all: libpng.lib |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 43 | |
Cosmin Truta | 9ab7b4c | 2014-03-22 13:13:11 -0500 | [diff] [blame] | 44 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) |
Cosmin Truta | 82200da | 2014-03-22 09:29:59 -0500 | [diff] [blame] | 45 | $(CP) $< $@ |
Glenn Randers-Pehrson | 7253144 | 2010-04-17 08:17:51 -0500 | [diff] [blame] | 46 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 47 | png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 48 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 49 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 50 | pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 51 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 52 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 53 | pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 54 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | b3870ab | 2006-05-11 09:43:09 -0500 | [diff] [blame] | 55 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 56 | pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 57 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 58 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 59 | pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 60 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 61 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 62 | pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 63 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 64 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 65 | pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 66 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 67 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 68 | pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 69 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | 4393a9a | 1999-09-17 12:27:26 -0500 | [diff] [blame] | 70 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 71 | pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 72 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 73 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 74 | pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 75 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 76 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 77 | pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 78 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 79 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 80 | pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 81 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 82 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 83 | pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 84 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 85 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 86 | pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 87 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 88 | |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 89 | pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 90 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 91 | |
Glenn Randers-Pehrson | 5b5dcf8 | 2004-07-17 22:45:44 -0500 | [diff] [blame] | 92 | libpng.lib: $(OBJS) |
| 93 | -$(RM) $@ |
| 94 | $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 95 | |
Glenn Randers-Pehrson | 0b3634b | 2011-12-17 09:57:00 -0600 | [diff] [blame] | 96 | pngtest$(O): png.h pngconf.h pnglibconf.h |
Glenn Randers-Pehrson | 4250328 | 2014-01-12 10:44:01 -0600 | [diff] [blame] | 97 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 98 | |
Glenn Randers-Pehrson | 5b5dcf8 | 2004-07-17 22:45:44 -0500 | [diff] [blame] | 99 | pngtest.exe: pngtest$(O) libpng.lib |
| 100 | $(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE) |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 101 | |
| 102 | test: pngtest.exe |
| 103 | pngtest |
| 104 | |
Glenn Randers-Pehrson | 5b5dcf8 | 2004-07-17 22:45:44 -0500 | [diff] [blame] | 105 | clean: |
| 106 | -$(RM) *$(O) |
| 107 | -$(RM) libpng.lib |
Glenn Randers-Pehrson | 7253144 | 2010-04-17 08:17:51 -0500 | [diff] [blame] | 108 | -$(RM) pnglibconf.h |
Glenn Randers-Pehrson | 5b5dcf8 | 2004-07-17 22:45:44 -0500 | [diff] [blame] | 109 | -$(RM) pngtest.exe |
| 110 | -$(RM) pngout.png |
| 111 | |
Glenn Randers-Pehrson | 345bc27 | 1998-06-14 14:43:31 -0500 | [diff] [blame] | 112 | # End of makefile for libpng |
| 113 | |