~ubuntu-branches/ubuntu/lucid/perl-tk/lucid

« back to all changes in this revision

Viewing changes to PNG/libpng/scripts/makefile.gcc

  • Committer: Bazaar Package Importer
  • Author(s): Colin Tuckley
  • Date: 2008-02-15 13:56:59 UTC
  • mfrom: (1.1.3 upstream) (4.1.1 hardy)
  • Revision ID: james.westby@ubuntu.com-20080215135659-ru2oqlykuju20fav
Tags: 1:804.028-1
* New Upstream Release (Closes: #463080).
* Update to Debhelper v5.
* Build with XFT=1 (Closes: #411129).

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
# Compiler, linker, lib and other tools
11
11
CC = gcc
12
12
LD = $(CC)
13
 
AR = ar rcs
 
13
AR_RC = ar rcs
14
14
RANLIB = ranlib
15
 
RM = rm -f
 
15
RM_F = rm -f
16
16
 
17
17
CDEBUG = -g -DPNG_DEBUG=5
18
18
LDDEBUG =
19
19
CRELEASE = -O2
20
20
LDRELEASE = -s
21
 
CFLAGS = -I$(ZLIBINC) -Wall $(CRELEASE)
22
 
LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm $(LDRELEASE)
 
21
#CFLAGS = -Wall $(CDEBUG)
 
22
CFLAGS = -Wall $(CRELEASE)
 
23
#LDFLAGS = $(LDDEBUG)
 
24
LDFLAGS = $(LDRELEASE)
 
25
LIBS = -lz -lm
23
26
 
24
27
# File extensions
25
28
O=.o
26
29
A=.a
27
 
E=
 
30
EXE=
28
31
 
29
32
# Variables
30
33
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
31
 
        pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
32
 
        pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
 
34
       pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
 
35
       pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
33
36
 
34
37
# Targets
35
 
all: libpng$(A) pngtest$(E)
 
38
all: static
 
39
 
 
40
.c$(O):
 
41
        $(CC) -c $(CFLAGS) -I$(ZLIBINC) $<
 
42
 
 
43
static: libpng$(A) pngtest$(EXE)
 
44
 
 
45
shared:
 
46
        @echo This is a generic makefile that cannot create shared libraries.
 
47
        @echo Please use a configuration that is specific to your platform.
 
48
        @false
36
49
 
37
50
libpng$(A): $(OBJS)
38
 
        $(AR) $@ $(OBJS)
 
51
        $(AR_RC) $@ $(OBJS)
39
52
        $(RANLIB) $@
40
53
 
41
 
test: pngtest$(E)
42
 
        ./pngtest$(E)
 
54
test: pngtest$(EXE)
 
55
        ./pngtest$(EXE)
43
56
 
44
 
pngtest$(E): pngtest$(O) libpng$(A)
45
 
        $(LD) -o $@ pngtest$(O) $(LDFLAGS)
 
57
pngtest$(EXE): pngtest$(O) libpng$(A)
 
58
        $(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS)
46
59
 
47
60
clean:
48
 
        $(RM) *$(O) libpng$(A) pngtest$(E) pngout.png
 
61
        $(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png
49
62
 
50
63
png$(O): png.h pngconf.h
51
64
pngerror$(O): png.h pngconf.h