| 1 | # makefile for libpng |
| 2 | # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. |
| 3 | # For conditions of distribution and use, see copyright notice in png.h |
| 4 | # Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib |
| 5 | |
| 6 | # -------- Microsoft C 5.1 and later, does not use assembler code -------- |
| 7 | MODEL=L |
| 8 | CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib |
| 9 | #-Ox generates bad code with MSC 5.1 |
| 10 | CC=cl |
| 11 | LD=link |
| 12 | LDFLAGS=/e/st:0x1500/noe |
| 13 | O=.obj |
| 14 | |
| 15 | #uncomment next to put error messages in a file |
| 16 | ERRFILE= >> pngerrs |
| 17 | |
| 18 | # variables |
| 19 | OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) |
| 20 | OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) |
| 21 | OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) |
| 22 | |
| 23 | all: libpng.lib |
| 24 | |
| 25 | png$(O): png.h pngconf.h |
| 26 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 27 | |
| 28 | pngset$(O): png.h pngconf.h |
| 29 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 30 | |
| 31 | pngget$(O): png.h pngconf.h |
| 32 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 33 | |
| 34 | pngread$(O): png.h pngconf.h |
| 35 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 36 | |
| 37 | pngpread$(O): png.h pngconf.h |
| 38 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 39 | |
| 40 | pngrtran$(O): png.h pngconf.h |
| 41 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 42 | |
| 43 | pngrutil$(O): png.h pngconf.h |
| 44 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 45 | |
| 46 | pngerror$(O): png.h pngconf.h |
| 47 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 48 | |
| 49 | pngmem$(O): png.h pngconf.h |
| 50 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 51 | |
| 52 | pngrio$(O): png.h pngconf.h |
| 53 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 54 | |
| 55 | pngwio$(O): png.h pngconf.h |
| 56 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 57 | |
| 58 | pngtest$(O): png.h pngconf.h |
| 59 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 60 | |
| 61 | pngtrans$(O): png.h pngconf.h |
| 62 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 63 | |
| 64 | pngwrite$(O): png.h pngconf.h |
| 65 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 66 | |
| 67 | pngwtran$(O): png.h pngconf.h |
| 68 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 69 | |
| 70 | pngwutil$(O): png.h pngconf.h |
| 71 | $(CC) -c $(CFLAGS) $*.c $(ERRFILE) |
| 72 | |
| 73 | libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) |
| 74 | del libpng.lib |
| 75 | lib libpng $(OBJS1); |
| 76 | lib libpng $(OBJS2); |
| 77 | lib libpng $(OBJS3); |
| 78 | |
| 79 | pngtest.exe: pngtest.obj libpng.lib |
| 80 | $(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ; |
| 81 | |
| 82 | test: pngtest.exe |
| 83 | pngtest |
| 84 | |
| 85 | # End of makefile for libpng |
| 86 | |