author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 04 Oct 2010 01:19:32 +0300 | |
changeset 37 | 758a864f9613 |
parent 30 | 5dc02b23752f |
permissions | -rw-r--r-- |
0 | 1 |
# makefile for libpng using gcc (generic, static library) |
2 |
# Copyright (C) 2008 Glenn Randers-Pehrson |
|
3 |
# Copyright (C) 2000 Cosmin Truta |
|
4 |
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
5 |
# |
0 | 6 |
# This code is released under the libpng license. |
7 |
# For conditions of distribution and use, see the disclaimer |
|
8 |
# and license in png.h |
|
9 |
||
10 |
# Location of the zlib library and include files |
|
11 |
ZLIBINC = ../zlib |
|
12 |
ZLIBLIB = ../zlib |
|
13 |
||
14 |
# Compiler, linker, lib and other tools |
|
15 |
CC = gcc |
|
16 |
LD = $(CC) |
|
17 |
AR_RC = ar rcs |
|
18 |
RANLIB = ranlib |
|
19 |
RM_F = rm -f |
|
20 |
||
21 |
CDEBUG = -g -DPNG_DEBUG=5 |
|
22 |
LDDEBUG = |
|
23 |
CRELEASE = -O2 |
|
24 |
LDRELEASE = -s |
|
25 |
#CFLAGS = -W -Wall $(CDEBUG) |
|
26 |
CFLAGS = -W -Wall $(CRELEASE) |
|
27 |
#LDFLAGS = $(LDDEBUG) |
|
28 |
LDFLAGS = $(LDRELEASE) |
|
29 |
LIBS = -lz -lm |
|
30 |
||
31 |
# File extensions |
|
32 |
O=.o |
|
33 |
A=.a |
|
34 |
EXE= |
|
35 |
||
36 |
# Variables |
|
37 |
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \ |
|
38 |
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \ |
|
39 |
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) |
|
40 |
||
41 |
# Targets |
|
42 |
all: static |
|
43 |
||
44 |
.c$(O): |
|
45 |
$(CC) -c $(CFLAGS) -I$(ZLIBINC) $< |
|
46 |
||
47 |
static: libpng$(A) pngtest$(EXE) |
|
48 |
||
49 |
shared: |
|
50 |
@echo This is a generic makefile that cannot create shared libraries. |
|
51 |
@echo Please use a configuration that is specific to your platform. |
|
52 |
@false |
|
53 |
||
54 |
libpng$(A): $(OBJS) |
|
55 |
$(AR_RC) $@ $(OBJS) |
|
56 |
$(RANLIB) $@ |
|
57 |
||
58 |
test: pngtest$(EXE) |
|
59 |
./pngtest$(EXE) |
|
60 |
||
61 |
pngtest$(EXE): pngtest$(O) libpng$(A) |
|
62 |
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS) |
|
63 |
||
64 |
clean: |
|
65 |
$(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png |
|
66 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
67 |
png$(O): png.h pngconf.h pngpriv.h |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
68 |
pngerror$(O): png.h pngconf.h pngpriv.h |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
69 |
pngget$(O): png.h pngconf.h pngpriv.h |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
70 |
pngmem$(O): png.h pngconf.h pngpriv.h |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
71 |
pngpread$(O): png.h pngconf.h pngpriv.h |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
72 |
pngread$(O): png.h pngconf.h pngpriv.h |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
73 |
pngrio$(O): png.h pngconf.h pngpriv.h |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
74 |
pngrtran$(O): png.h pngconf.h pngpriv.h |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
75 |
pngrutil$(O): png.h pngconf.h pngpriv.h |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
76 |
pngset$(O): png.h pngconf.h pngpriv.h |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
77 |
pngtrans$(O): png.h pngconf.h pngpriv.h |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
78 |
pngwio$(O): png.h pngconf.h pngpriv.h |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
79 |
pngwrite$(O): png.h pngconf.h pngpriv.h |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
80 |
pngwtran$(O): png.h pngconf.h pngpriv.h |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
81 |
pngwutil$(O): png.h pngconf.h pngpriv.h |
0 | 82 |
|
83 |
pngtest$(O): png.h pngconf.h |