671242f350d172e106580348e24bab66b0d7e6a5vboxsync# makefile for cygwin on x86
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# Builds both dll (with import lib) and static lib versions
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# of the library, and builds two copies of pngtest: one
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# statically linked and one dynamically linked.
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# Copyright (C) 2002 Soren Anderson, Charles Wilson, and Glenn Randers-Pehrson
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# based on makefile for linux-elf w/mmx by:
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# Copyright (C) 1998-2000 Greg Roelofs
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# Copyright (C) 1996, 1997 Andreas Dilger
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# For conditions of distribution and use, see copyright notice in png.h
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# This makefile intends to support building outside the src directory
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# if desired. When invoking it, specify an argument to SRCDIR on the
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# command line that points to the top of the directory where your source
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# is located.
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncifdef SRCDIR
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncVPATH = $(SRCDIR)
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncelse
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncSRCDIR = .
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncendif
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# Override DESTDIR= on the make install command line to easily support
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# installing into a temporary location. Example:
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# make install DESTDIR=/tmp/build/libpng
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# If you're going to install into a temporary location
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# you execute make install.
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncDESTDIR=
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# To enable assembler optimizations, add '-DPNG_USE_PNGGCCRD' to
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# $CFLAGS, and include pnggccrd.o in $OBJS, below, and in the dependency
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# list at the bottom of this makefile.
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncCC=gcc
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncifdef MINGW
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncMINGW_CCFLAGS=-mno-cygwin -I/usr/include/mingw
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncMINGW_LDFLAGS=-mno-cygwin -L/usr/lib/mingw
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncendif
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# Where "make install" puts libpng*.a, *png*.dll, png.h, and pngconf.h
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncifndef prefix
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncprefix=/usr
671242f350d172e106580348e24bab66b0d7e6a5vboxsync$(warning You haven't specified a 'prefix=' location. Defaulting to "/usr")
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncendif
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# Where the zlib library and include files are located
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncZLIBLIB= /usr/lib
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncZLIBINC=
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#ZLIBLIB=../zlib
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#ZLIBINC=../zlib
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncALIGN=
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# for i386:
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#ALIGN=-malign-loops=2 -malign-functions=2
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncWARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -Wmissing-declarations -Wtraditional -Wcast-align \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync### if you use the asm, add pnggccrd.o to the OBJS list
671242f350d172e106580348e24bab66b0d7e6a5vboxsync###
671242f350d172e106580348e24bab66b0d7e6a5vboxsync### if you don't need thread safety, but want the asm accel
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# $(addprefix -I,$(ZLIBINC)) -Wall -O3 $(ALIGN) -funroll-loops \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
671242f350d172e106580348e24bab66b0d7e6a5vboxsync### if you need thread safety and want (minimal) asm accel
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_USE_PNGGCCRD $(addprefix -I,$(ZLIBINC)) \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# -Wall -O3 $(ALIGN) -funroll-loops \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
671242f350d172e106580348e24bab66b0d7e6a5vboxsync### Normal (non-asm) compilation
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncCFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -Wall -O3 $(ALIGN) -funroll-loops \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncLIBNAME = libpng12
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncPNGMAJ = 0
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncCYGDLL = 12
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncPNGMIN = 1.2.8
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncPNGVER = $(PNGMAJ).$(PNGMIN)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncSHAREDLIB=cygpng$(CYGDLL).dll
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncSTATLIB=libpng.a
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncIMPLIB=libpng.dll.a
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncSHAREDDEF=libpng.def
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncLIBS=$(SHAREDLIB) $(STATLIB)
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncEXE=.exe
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncLDFLAGS=$(strip -L. $(MINGW_LDFLAGS) -lpng $(addprefix -L,$(ZLIBLIB)) -lz)
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncLDSFLAGS=$(strip -shared -L. $(MINGW_LDFLAGS) -Wl,--export-all)
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncLDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncMKDIR=/bin/mkdir -pv
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncRANLIB=ranlib
671242f350d172e106580348e24bab66b0d7e6a5vboxsync#RANLIB=echo
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncINCPATH=$(prefix)/include
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncLIBPATH=$(prefix)/lib
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncBINPATH=$(prefix)/bin
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncMANPATH=$(prefix)/man
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncMAN3PATH=$(MANPATH)/man3
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncMAN5PATH=$(MANPATH)/man5
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# cosmetic: shortened strings:
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncS =$(SRCDIR)
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncD =$(DESTDIR)
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncDB =$(D)$(BINPATH)
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncDI =$(D)$(INCPATH)
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncDL =$(D)$(LIBPATH)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncOBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync pngwtran.o pngmem.o pngerror.o pngpread.o # pnggccrd.o
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncOBJSDLL = $(OBJS:.o=.pic.o)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync.SUFFIXES: .c .o .pic.o
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync%.o : %.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsync $(CC) -c $(CFLAGS) -o $@ $<
671242f350d172e106580348e24bab66b0d7e6a5vboxsync%.pic.o : CFLAGS += -DPNG_BUILD_DLL
671242f350d172e106580348e24bab66b0d7e6a5vboxsync%.pic.o : %.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsync $(CC) -c $(CFLAGS) -o $@ $<
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncall: all-static all-shared libpng.pc libpng-config libpng.pc libpng-config
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# Make this to verify that "make [...] install" will do what you want.
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncbuildsetup-tell:
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @echo VPATH is set to: \"$(VPATH)\"
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @echo prefix is set to: \"$(prefix)\"
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @echo -e INCPATH,LIBPATH, etc. are set to:'\n' \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync $(addprefix $(D),$(INCPATH)'\n' $(LIBPATH)'\n' $(BINPATH)'\n' \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync $(MANPATH)'\n' $(MAN3PATH)'\n' $(MAN5PATH)'\n')'\n'
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsynclibpng.pc: scripts/libpng.pc.in
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @echo -e Making pkg-config file for this libpng installation..'\n' \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync using PREFIX=\"$(prefix)\"'\n'
671242f350d172e106580348e24bab66b0d7e6a5vboxsync cat $(S)/scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! | \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync sed -e s/-lm// > libpng.pc
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsynclibpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @echo -e Making $(LIBNAME) libpng-config file for this libpng \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync installation..'\n' using PREFIX=\"$(prefix)\"'\n'
671242f350d172e106580348e24bab66b0d7e6a5vboxsync ( cat $(S)/scripts/libpng-config-head.in; \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync echo prefix=\"$(prefix)\"; \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync echo L_opts=\"-L$(LIBPATH)\"; \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync echo libs=\"-lpng$(CYGDLL) -lz\"; \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync cat $(S)/scripts/libpng-config-body.in ) > libpng-config
671242f350d172e106580348e24bab66b0d7e6a5vboxsync chmod +x libpng-config
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncstatic: all-static
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncshared: all-shared
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncall-static: $(STATLIB) pngtest-stat$(EXE)
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncall-shared: $(SHAREDLIB) pngtest$(EXE)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpnggccrd.o: pnggccrd.c png.h pngconf.h
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @echo ""
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @echo ' You can ignore the "control reaches end of non-void function"'
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @echo ' warning and "<variable> defined but not used" warnings:'
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @echo ""
671242f350d172e106580348e24bab66b0d7e6a5vboxsync $(CC) -c $(CFLAGS) -o $@ $<
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpnggccrd.pic.o: pnggccrd.c png.h pngconf.h
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @echo ""
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @echo ' You can ignore the "control reaches end of non-void function"'
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @echo ' warning and "<variable> defined but not used" warnings:'
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @echo ""
671242f350d172e106580348e24bab66b0d7e6a5vboxsync $(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync$(STATLIB): $(OBJS)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync ar rc $@ $(OBJS)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync $(RANLIB) $@
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync$(SHAREDDEF): scripts/png32ms.def
671242f350d172e106580348e24bab66b0d7e6a5vboxsync cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync sed -e 's/\([^;]*\);/;/' > $@
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync$(SHAREDLIB): $(OBJSDLL) $(SHAREDDEF)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync $(CC) $(LDSFLAGS) -o $@ $(OBJSDLL) -L. $(LDEXTRA)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngtest$(EXE): pngtest.pic.o $(SHAREDLIB)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync $(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngtest-stat$(EXE): pngtest.o $(STATLIB)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync $(CC) -static $(CFLAGS) $< $(LDFLAGS) -o $@
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngtest.pic.o: pngtest.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsync $(CC) $(CFLAGS) -c $< -o $@
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngtest.o: pngtest.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsync $(CC) $(CFLAGS) -c $< -o $@
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsynctest: test-static test-shared
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsynctest-static: pngtest-stat$(EXE)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync ./pngtest-stat $(S)/pngtest.png
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsynctest-shared: pngtest$(EXE)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync ./pngtest $(S)/pngtest.png
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncinstall-static: $(STATLIB) install-headers install-man
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi
671242f350d172e106580348e24bab66b0d7e6a5vboxsync install -m 644 $(STATLIB) $(DL)/$(LIBNAME).a
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@rm -f $(DL)/$(STATLIB)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync (cd $(DL); ln -sf $(LIBNAME).a $(STATLIB))
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncinstall-shared: $(SHAREDLIB) libpng.pc libpng-config install-headers install-man
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@if [ ! -d $(DB) ]; then $(MKDIR) $(DB); fi
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR) $(DL)/pkgconfig; fi
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
671242f350d172e106580348e24bab66b0d7e6a5vboxsync install -m 644 $(IMPLIB) $(DL)/$(LIBNAME).dll.a
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@rm -f $(DL)/$(IMPLIB)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync (cd $(DL); ln -sf $(LIBNAME).dll.a $(IMPLIB))
671242f350d172e106580348e24bab66b0d7e6a5vboxsync install -s -m 755 $(SHAREDLIB) $(DB)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync install -m 644 libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
671242f350d172e106580348e24bab66b0d7e6a5vboxsync (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncinstall-headers:
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@if [ ! -d $(DI) ]; then $(MKDIR) $(DI); fi
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR) $(DI)/$(LIBNAME); fi
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@rm -f $(DI)/png.h
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@rm -f $(DI)/pngconf.h
671242f350d172e106580348e24bab66b0d7e6a5vboxsync install -m 644 $(S)/png.h $(S)/pngconf.h $(DI)/$(LIBNAME)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@rm -f $(DI)/libpng
671242f350d172e106580348e24bab66b0d7e6a5vboxsync (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncinstall-man:
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@if [ ! -d $(D)$(MAN3PATH) ]; then $(MKDIR) $(D)$(MAN3PATH); fi
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@if [ ! -d $(D)$(MAN5PATH) ]; then $(MKDIR) $(D)$(MAN5PATH); fi
671242f350d172e106580348e24bab66b0d7e6a5vboxsync install -m 644 $(S)/libpngpf.3 $(S)/libpng.3 $(D)$(MAN3PATH)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync install -m 644 $(S)/png.5 $(D)$(MAN5PATH)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncinstall-config: libpng-config
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@/bin/rm -f $(DB)/libpng-config
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -@/bin/rm -f $(DB)/$(LIBNAME)-config
671242f350d172e106580348e24bab66b0d7e6a5vboxsync cp libpng-config $(DB)/$(LIBNAME)-config
671242f350d172e106580348e24bab66b0d7e6a5vboxsync chmod 755 $(DB)/$(LIBNAME)-config
671242f350d172e106580348e24bab66b0d7e6a5vboxsync (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# Run this to verify that a future `configure' run will pick up the settings
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# you want.
671242f350d172e106580348e24bab66b0d7e6a5vboxsynctest-config-install: SHELL=/bin/bash
671242f350d172e106580348e24bab66b0d7e6a5vboxsynctest-config-install: $(DB)/libpng-config
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @echo -e Testing libpng-config functions...'\n'
671242f350d172e106580348e24bab66b0d7e6a5vboxsync @ for TYRA in LDFLAGS CPPFLAGS CFLAGS LIBS VERSION; \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync do \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync printf "(%d)\t %10s =%s\n" $$(($$gytiu + 1)) $$TYRA \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync "$$($(DB)/libpng-config `echo --$$TYRA |tr '[:upper:]' '[:lower:]'`)"; \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync gytiu=$$(( $$gytiu + 1 )); \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync done
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncinstall: install-static install-shared install-man install-config
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# If you installed in $(DESTDIR), test-installed won't work until you
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# move the library to its final location. Use test-dd to test it
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# before then.
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsynctest-dd:
671242f350d172e106580348e24bab66b0d7e6a5vboxsync echo
671242f350d172e106580348e24bab66b0d7e6a5vboxsync echo Testing installed dynamic shared library in $(DL).
671242f350d172e106580348e24bab66b0d7e6a5vboxsync $(CC) -I$(DI) $(CFLAGS) \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync `$(BINPATH)/libpng12-config --cflags` pngtest.c \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -L$(DL) -L$(ZLIBLIB) \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -o pngtestd `$(BINPATH)/libpng12-config --ldflags`
671242f350d172e106580348e24bab66b0d7e6a5vboxsync ./pngtestd pngtest.png
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsynctest-installed:
671242f350d172e106580348e24bab66b0d7e6a5vboxsync $(CC) $(CFLAGS) \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync `$(BINPATH)/libpng12-config --cflags` pngtest.c \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -L$(ZLIBLIB) \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -o pngtesti$(EXE) `$(BINPATH)/libpng12-config --ldflags`
671242f350d172e106580348e24bab66b0d7e6a5vboxsync ./pngtesti$(EXE) pngtest.png
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncclean:
671242f350d172e106580348e24bab66b0d7e6a5vboxsync /bin/rm -f *.pic.o *.o $(STATLIB) $(IMPLIB) $(SHAREDLIB) \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync pngtest-stat$(EXE) pngtest$(EXE) pngout.png $(SHAREDDEF) \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync libpng-config libpng.pc pngtesti$(EXE)
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncDOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncwritelock:
671242f350d172e106580348e24bab66b0d7e6a5vboxsync chmod a-w *.[ch35] $(DOCS) scripts/*
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync.PHONY: buildsetup-tell libpng.pc libpng-config test-config-install clean
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# DO NOT DELETE THIS LINE -- make depend depends on it.
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpng.o png.pic.o: png.h pngconf.h png.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngset.o pngset.pic.o: png.h pngconf.h pngset.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngget.o pngget.pic.o: png.h pngconf.h pngget.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngread.o pngread.pic.o: png.h pngconf.h pngread.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngtest.o: png.h pngconf.h pngtest.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncpngtest-stat.o: png.h pngconf.h pngtest.c
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync
671242f350d172e106580348e24bab66b0d7e6a5vboxsync