~ubuntu-branches/ubuntu/dapper/perl-tk/dapper

« back to all changes in this revision

Viewing changes to PNG/libpng/scripts/makefile.hpux.ia64

  • Committer: Bazaar Package Importer
  • Author(s): Michael C. Schultheiss
  • Date: 2006-01-16 16:54:02 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060116165402-1ppygm8hh8ahel2x
Tags: 1:804.027-2
* Incorporate changes from NMU (Thanks to Steve Kowalik.
  Closes: #348086)
* debian/control: Update Standards-Version (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
 
2
# Copyright (C) 1999-2002 Glenn Randers-Pehrson
 
3
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
 
4
# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
 
5
# For conditions of distribution and use, see copyright notice in png.h
 
6
 
 
7
# Where the zlib library and include files are located
 
8
ZLIBLIB=../zlib
 
9
ZLIBINC=../zlib
 
10
 
 
11
# Note that if you plan to build a libpng shared library, zlib must also
 
12
# be a shared library, which zlib's configure does not do.  After running
 
13
# zlib's configure, edit the appropriate lines of makefile to read:
 
14
#   CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
 
15
#   LDSHARED=ld -b
 
16
#   SHAREDLIB=libz.sl
 
17
 
 
18
CC=cc
 
19
CFLAGS=-I$(ZLIBINC) -O
 
20
# Caution: be sure you have built zlib with the same CFLAGS.
 
21
CCFLAGS=-I$(ZLIBINC) -O
 
22
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
 
23
 
 
24
RANLIB=ranlib
 
25
 
 
26
PNGMAJ = 0
 
27
PNGMIN = 1.2.5
 
28
PNGVER = $(PNGMAJ).$(PNGMIN)
 
29
LIBNAME = libpng12
 
30
 
 
31
# where make install puts libpng.a, libpng12.sl, and png.h
 
32
prefix=/opt/libpng
 
33
INCPATH=$(prefix)/include
 
34
LIBPATH=$(prefix)/lib
 
35
MANPATH=$(prefix)/man
 
36
BINPATH=$(prefix)/bin
 
37
 
 
38
# override DESTDIR= on the make install command line to easily support
 
39
# installing into a temporary location.  Example:
 
40
#
 
41
#    make install DESTDIR=/tmp/build/libpng
 
42
#
 
43
# If you're going to install into a temporary location
 
44
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
 
45
# you execute make install.
 
46
DESTDIR=
 
47
 
 
48
DB=$(DESTDIR)$(BINPATH)
 
49
DI=$(DESTDIR)$(INCPATH)
 
50
DL=$(DESTDIR)$(LIBPATH)
 
51
DM=$(DESTDIR)$(MANPATH)
 
52
 
 
53
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
 
54
        pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
 
55
        pngwtran.o pngmem.o pngerror.o pngpread.o
 
56
 
 
57
OBJSDLL = $(OBJS:.o=.pic.o)
 
58
 
 
59
.SUFFIXES:      .c .o .pic.o
 
60
 
 
61
.c.pic.o:
 
62
        $(CC) -c $(CFLAGS) +z -o $@ $*.c
 
63
 
 
64
all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config
 
65
 
 
66
libpng.a: $(OBJS)
 
67
        ar rc $@ $(OBJS)
 
68
        $(RANLIB) $@
 
69
 
 
70
libpng.pc:
 
71
        cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
 
72
 
 
73
libpng-config:
 
74
        ( cat scripts/libpng-config-head.in; \
 
75
        echo prefix=\"$(prefix)\"; \
 
76
        echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
 
77
        echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \
 
78
        echo L_opts=\"-L$(LIBPATH)\"; \
 
79
        echo libs=\"-lpng12 -lz -lm\"; \
 
80
        cat scripts/libpng-config-body.in ) > libpng-config
 
81
        chmod +x libpng-config
 
82
 
 
83
$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ)
 
84
        ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl
 
85
 
 
86
$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER)
 
87
        ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ)
 
88
 
 
89
$(LIBNAME).sl.$(PNGVER): $(OBJSDLL)
 
90
        $(LD) -b +s \
 
91
        +h $(LIBNAME).sl.$(PNGMAJ) -o $(LIBNAME).sl.$(PNGVER) $(OBJSDLL)
 
92
 
 
93
libpng.sl.3.$(PNGMIN): $(OBJSDLL)
 
94
        $(LD) -b +s \
 
95
        +h libpng.sl.3 -o libpng.sl.3.$(PNGMIN) $(OBJSDLL)
 
96
 
 
97
pngtest: pngtest.o libpng.a
 
98
        $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
 
99
 
 
100
test: pngtest
 
101
        ./pngtest
 
102
 
 
103
install-headers: png.h pngconf.h
 
104
        -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
 
105
        -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
 
106
        cp png.h pngconf.h $(DI)/$(LIBNAME)
 
107
        chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
 
108
        -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
 
109
        -@/bin/rm -f $(DI)/libpng
 
110
        (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
 
111
 
 
112
install-static: install-headers libpng.a
 
113
        -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
 
114
        cp libpng.a $(DL)/$(LIBNAME).a
 
115
        chmod 644 $(DL)/$(LIBNAME).a
 
116
        -@/bin/rm -f $(DL)/libpng.a
 
117
        (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
 
118
 
 
119
install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc \
 
120
        libpng.sl.3.$(PNGMIN)
 
121
        -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
 
122
        -@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGVER)* $(DL)/$(LIBNAME).sl
 
123
        -@/bin/rm -f $(DL)/libpng.sl
 
124
        -@/bin/rm -f $(DL)/libpng.sl.3
 
125
        -@/bin/rm -f $(DL)/libpng.sl.3.$(PNGMIN)*
 
126
        cp $(LIBNAME).sl.$(PNGVER) $(DL)
 
127
        cp libpng.sl.3.$(PNGMIN) $(DL)
 
128
        chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER)
 
129
        chmod 755 $(DL)/libpng.sl.3.$(PNGMIN)
 
130
        (cd $(DL); \
 
131
        ln -sf libpng.sl.3.$(PNGMIN) libpng.sl.3; \
 
132
        ln -sf libpng.sl.3 libpng.sl; \
 
133
        ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \
 
134
        ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl)
 
135
        -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
 
136
        -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
 
137
        -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
 
138
        cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
 
139
        chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
 
140
        (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
 
141
 
 
142
install-man: libpng.3 libpngpf.3 png.5
 
143
        -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
 
144
        -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
 
145
        -@/bin/rm -f $(DM)/man3/libpng.3
 
146
        -@/bin/rm -f $(DM)/man3/libpngpf.3
 
147
        cp libpng.3 $(DM)/man3
 
148
        cp libpngpf.3 $(DM)/man3
 
149
        -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
 
150
        -@/bin/rm -f $(DM)/man5/png.5
 
151
        cp png.5 $(DM)/man5
 
152
 
 
153
install-config: libpng-config
 
154
        -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
 
155
        -@/bin/rm -f $(DB)/libpng-config
 
156
        -@/bin/rm -f $(DB)/$(LIBNAME)-config
 
157
        cp libpng-config $(DB)/$(LIBNAME)-config
 
158
        chmod 755 $(DB)/$(LIBNAME)-config
 
159
        (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
 
160
 
 
161
install: install-static install-shared install-man install-config
 
162
 
 
163
# If you installed in $(DESTDIR), test-installed won't work until you
 
164
# move the library to its final location.
 
165
 
 
166
test-installed:
 
167
        echo
 
168
        echo Testing installed dynamic shared library.
 
169
        $(CC) $(CCFLAGS) \
 
170
           `$(BINPATH)/libpng12-config --cflags` pngtest.c \
 
171
           -L$(ZLIBLIB) \
 
172
           -o pngtesti `$(BINPATH)/libpng12-config --ldflags`
 
173
        ./pngtesti pngtest.png
 
174
 
 
175
clean:
 
176
        /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
 
177
        libpng-config $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)* \
 
178
        libpng.sl.3.$(PNGMIN) \
 
179
        libpng.pc
 
180
 
 
181
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
 
182
writelock:
 
183
        chmod a-w *.[ch35] $(DOCS) scripts/*
 
184
 
 
185
# DO NOT DELETE THIS LINE -- make depend depends on it.
 
186
 
 
187
png.o: png.h pngconf.h
 
188
pngerror.o: png.h pngconf.h
 
189
pngrio.o: png.h pngconf.h
 
190
pngwio.o: png.h pngconf.h
 
191
pngmem.o: png.h pngconf.h
 
192
pngset.o: png.h pngconf.h
 
193
pngget.o: png.h pngconf.h
 
194
pngread.o: png.h pngconf.h
 
195
pngrtran.o: png.h pngconf.h
 
196
pngrutil.o: png.h pngconf.h
 
197
pngtest.o: png.h pngconf.h
 
198
pngtrans.o: png.h pngconf.h
 
199
pngwrite.o: png.h pngconf.h
 
200
pngwtran.o: png.h pngconf.h
 
201
pngwutil.o: png.h pngconf.h
 
202
pngpread.o: png.h pngconf.h
 
203