makefile.intel 3.4 KB
Newer Older
1 2 3
# Makefile for libpng
# Microsoft Visual C++ with Intel C/C++ Compiler 4.0 and later

4
# Copyright (C) 2006 Glenn Randers-Pehrson
5 6
# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
# 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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
# ------------------- Intel C/C++ Compiler 4.0 and later -------------------

# Where the zlib library and include files are located
ZLIBLIB=..\zlib
ZLIBINC=..\zlib

# Target CPU
CPU=6		# Pentium II
#CPU=5		# Pentium

# Calling convention
CALLING=r	# __fastcall
#CALLING=z	# __stdcall
#CALLING=d	# __cdecl

# Uncomment next to put error messages in a file
#ERRFILE=>>pngerrs

# --------------------------------------------------------------------------

CC=icl -c
35
CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -I$(ZLIBINC) -nologo
36 37 38 39 40
LD=link
LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO

O=.obj

41 42
OBJS=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) \
pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) \
43
pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
44

45
all: test
46

47 48 49 50 51
# see scripts/pnglibconf.mak for more options
pnglibconf.h: scripts/pnglibconf.h
	cp scripts/pnglibconf.h $@

png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
52 53
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

54
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
55 56
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

57
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
58 59
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

60
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
61 62
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

63
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
64 65
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

66
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
67 68
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

69
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
70 71
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

72
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
73 74
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

75
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
76 77
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

78
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
79 80
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

81
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
82 83
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

84
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
85 86
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

87
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
88 89
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

90
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
91 92
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

93
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
94 95 96 97 98 99 100 101 102
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

libpng.lib: $(OBJS)
	if exist libpng.lib del libpng.lib
	lib /NOLOGO /OUT:libpng.lib $(OBJS)

pngtest.exe: pngtest.obj libpng.lib
	$(LD) $(LDFLAGS) /OUT:pngtest.exe pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib

103
pngtest$(O): png.h pngconf.h pnglibconf.h
104 105
	$(CC) $(CFLAGS) $*.c $(ERRFILE)

106 107 108 109 110
test: pngtest.exe
	pngtest.exe


# End of makefile for libpng