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

« back to all changes in this revision

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

  • 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:
3
3
#   of the library, and builds two copies of pngtest: one
4
4
#   statically linked and one dynamically linked.
5
5
#
6
 
# Copyright (C) 2002 Soren Anderson, Charles Wilson, and Glenn Randers-Pehrson
7
 
#   based on makefile for linux-elf w/mmx by:
 
6
# Copyright (C) 2002, 2006 Soren Anderson, Charles Wilson,
 
7
#    and Glenn Randers-Pehrson, based on makefile for linux-elf w/mmx by:
8
8
# Copyright (C) 1998-2000 Greg Roelofs
9
9
# Copyright (C) 1996, 1997 Andreas Dilger
10
10
# For conditions of distribution and use, see copyright notice in png.h
46
46
prefix=/usr
47
47
$(warning You haven't specified a 'prefix=' location. Defaulting to "/usr")
48
48
endif
 
49
exec_prefix=$(prefix)
49
50
 
50
51
# Where the zlib library and include files are located
51
52
ZLIBLIB= /usr/lib
79
80
LIBNAME = libpng12
80
81
PNGMAJ = 0
81
82
CYGDLL = 12
82
 
PNGMIN = 1.2.5
 
83
PNGMIN = 1.2.12
83
84
PNGVER = $(PNGMAJ).$(PNGMIN)
84
85
 
85
86
SHAREDLIB=cygpng$(CYGDLL).dll
93
94
LDSFLAGS=$(strip -shared -L.  $(MINGW_LDFLAGS) -Wl,--export-all)
94
95
LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz
95
96
 
96
 
MKDIR=/bin/mkdir -pv
 
97
MKDIR_P=/bin/mkdir -pv
97
98
RANLIB=ranlib
98
99
#RANLIB=echo
99
100
 
100
101
INCPATH=$(prefix)/include
101
 
LIBPATH=$(prefix)/lib
 
102
LIBPATH=$(exec_prefix)/lib
102
103
 
103
 
BINPATH=$(prefix)/bin
 
104
BINPATH=$(exec_prefix)/bin
104
105
MANPATH=$(prefix)/man
105
106
MAN3PATH=$(MANPATH)/man3
106
107
MAN5PATH=$(MANPATH)/man5
176
177
        ar rc $@ $(OBJS)
177
178
        $(RANLIB) $@
178
179
 
179
 
$(SHAREDDEF): projects/msvc/png32ms.def
 
180
$(SHAREDDEF): scripts/pngw32.def
180
181
        cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \
181
182
        sed -e 's/\([^;]*\);/;/' > $@
182
183
 
204
205
        ./pngtest $(S)/pngtest.png
205
206
 
206
207
install-static: $(STATLIB) install-headers install-man
207
 
        -@if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi
 
208
        -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
208
209
        install -m 644 $(STATLIB) $(DL)/$(LIBNAME).a
209
210
        -@rm -f $(DL)/$(STATLIB)
210
211
        (cd $(DL); ln -sf $(LIBNAME).a $(STATLIB))
211
212
 
212
213
install-shared: $(SHAREDLIB) libpng.pc libpng-config install-headers install-man
213
 
        -@if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi
214
 
        -@if [ ! -d $(DB) ]; then $(MKDIR) $(DB); fi
215
 
        -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR) $(DL)/pkgconfig; fi
 
214
        -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
 
215
        -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
 
216
        -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
216
217
        -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
217
218
        -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
218
219
        install -m 644 $(IMPLIB) $(DL)/$(LIBNAME).dll.a
223
224
        (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
224
225
 
225
226
install-headers:
226
 
        -@if [ ! -d $(DI) ]; then $(MKDIR) $(DI); fi
227
 
        -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR) $(DI)/$(LIBNAME); fi
 
227
        -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
 
228
        -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
228
229
        -@rm -f $(DI)/png.h
229
230
        -@rm -f $(DI)/pngconf.h
230
231
        install -m 644 $(S)/png.h $(S)/pngconf.h $(DI)/$(LIBNAME)
232
233
        (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
233
234
 
234
235
install-man:
235
 
        -@if [ ! -d $(D)$(MAN3PATH) ]; then $(MKDIR) $(D)$(MAN3PATH); fi
236
 
        -@if [ ! -d $(D)$(MAN5PATH) ]; then $(MKDIR) $(D)$(MAN5PATH); fi
 
236
        -@if [ ! -d $(D)$(MAN3PATH) ]; then $(MKDIR_P) $(D)$(MAN3PATH); fi
 
237
        -@if [ ! -d $(D)$(MAN5PATH) ]; then $(MKDIR_P) $(D)$(MAN5PATH); fi
237
238
        install -m 644 $(S)/libpngpf.3 $(S)/libpng.3 $(D)$(MAN3PATH)
238
239
        install -m 644 $(S)/png.5 $(D)$(MAN5PATH)
239
240
 
240
241
install-config: libpng-config
241
 
        -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
 
242
        -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
242
243
        -@/bin/rm -f $(DB)/libpng-config
243
244
        -@/bin/rm -f $(DB)/$(LIBNAME)-config
244
245
        cp libpng-config $(DB)/$(LIBNAME)-config
260
261
install: install-static install-shared install-man install-config
261
262
 
262
263
# If you installed in $(DESTDIR), test-installed won't work until you
263
 
# move the library to its final location.
 
264
# move the library to its final location.  Use test-dd to test it
 
265
# before then.
 
266
 
 
267
test-dd:
 
268
        echo
 
269
        echo Testing installed dynamic shared library in $(DL).
 
270
        $(CC) -I$(DI) $(CFLAGS) \
 
271
           `$(BINPATH)/libpng12-config --cflags` pngtest.c \
 
272
           -L$(DL) -L$(ZLIBLIB) \
 
273
           -o pngtestd `$(BINPATH)/libpng12-config --ldflags`
 
274
        ./pngtestd pngtest.png
264
275
 
265
276
test-installed:
266
277
        $(CC) $(CFLAGS) \