xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 1 | # Makefile for libpng |
| 2 | # Microsoft Visual C++ with Intel C/C++ Compiler 4.0 and later |
| 3 | |
| 4 | # Copyright (C) 2006, 2014 Glenn Randers-Pehrson |
| 5 | # Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is |
| 6 | # copyright 1995 Guy Eric Schalnat, Group 42, Inc. |
| 7 | # |
| 8 | # This code is released under the libpng license. |
| 9 | # For conditions of distribution and use, see the disclaimer |
| 10 | # and license in png.h |
| 11 | # |
| 12 | # To use, do "nmake /f scripts\makefile.intel" |
| 13 | # |
| 14 | # ------------------- Intel C/C++ Compiler 4.0 and later ------------------- |
| 15 | |
| 16 | # Where the zlib library and include files are located |
| 17 | ZLIBLIB=..\zlib |
| 18 | ZLIBINC=..\zlib |
| 19 | |
| 20 | # Target CPU |
| 21 | CPU=6 # Pentium II |
| 22 | #CPU=5 # Pentium |
| 23 | |
| 24 | # Calling convention |
| 25 | CALLING=r # __fastcall |
| 26 | #CALLING=z # __stdcall |
| 27 | #CALLING=d # __cdecl |
| 28 | |
| 29 | # Uncomment next to put error messages in a file |
| 30 | #ERRFILE=>>pngerrs |
| 31 | |
| 32 | # -------------------------------------------------------------------------- |
| 33 | |
| 34 | CC=icl -c |
| 35 | CPPFLAGS=-I$(ZLIBINC) |
| 36 | CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -nologo |
| 37 | LD=link |
| 38 | LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO |
| 39 | CP=cp |
| 40 | |
| 41 | # Pre-built configuration |
| 42 | # See scripts\pnglibconf.mak for more options |
| 43 | PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt |
| 44 | |
| 45 | O=.obj |
| 46 | |
| 47 | OBJS=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) \ |
| 48 | pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) \ |
| 49 | pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) |
| 50 | |
| 51 | all: test |
| 52 | |
| 53 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT) |
| 54 | $(CP) $(PNGLIBCONF_H_PREBUILT) $@ |
| 55 | |
| 56 | png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 57 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 58 | |
| 59 | pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 60 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 61 | |
| 62 | pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 63 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 64 | |
| 65 | pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 66 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 67 | |
| 68 | pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 69 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 70 | |
| 71 | pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 72 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 73 | |
| 74 | pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 75 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 76 | |
| 77 | pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 78 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 79 | |
| 80 | pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 81 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 82 | |
| 83 | pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 84 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 85 | |
| 86 | pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 87 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 88 | |
| 89 | pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 90 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 91 | |
| 92 | pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 93 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 94 | |
| 95 | pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 96 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 97 | |
| 98 | pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
| 99 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 100 | |
| 101 | libpng.lib: $(OBJS) |
| 102 | if exist libpng.lib del libpng.lib |
| 103 | lib /NOLOGO /OUT:libpng.lib $(OBJS) |
| 104 | |
| 105 | pngtest.exe: pngtest.obj libpng.lib |
| 106 | $(LD) $(LDFLAGS) /OUT:pngtest.exe pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib |
| 107 | |
| 108 | pngtest$(O): png.h pngconf.h pnglibconf.h |
| 109 | $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE) |
| 110 | |
| 111 | test: pngtest.exe |
| 112 | pngtest.exe |
| 113 | |
| 114 | |
| 115 | # End of makefile for libpng |