VirtualBox

source: vbox/trunk/src/libs/libpng-1.6.42/scripts/makefile.hpgcc

Last change on this file was 103316, checked in by vboxsync, 4 months ago

libpng-1.6.42: Applied and adjusted our libpng changes to 1.6.42. bugref:8515

File size: 4.0 KB
Line 
1# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
2# Copyright (C) 2020-2022 Cosmin Truta
3# Copyright (C) 2002, 2006-2008, 2010-2014 Glenn Randers-Pehrson
4# Copyright (C) 2001, Laurent faillie
5# Copyright (C) 1998, 1999 Greg Roelofs
6# Copyright (C) 1996, 1997 Andreas Dilger
7#
8# This code is released under the libpng license.
9# For conditions of distribution and use, see the disclaimer
10# and license in png.h
11
12# Library name:
13LIBNAME=libpng16
14PNGMAJ=16
15
16# Shared library names:
17LIBSO=$(LIBNAME).sl
18LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
19
20# Utilities:
21CC=gcc
22LD=ld
23AR_RC=ar rc
24RANLIB=ranlib
25MKDIR_P=mkdir -p
26LN_SF=ln -sf
27CP=cp
28RM_F=/bin/rm -f
29
30# Where the zlib library and include files are located
31ZLIBLIB=/opt/zlib/lib
32ZLIBINC=/opt/zlib/include
33
34# Note that if you plan to build a libpng shared library, zlib must also
35# be a shared library, which zlib's configure does not do. After running
36# zlib's configure, edit the appropriate lines of makefile to read:
37# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
38# LDSHARED=ld -b
39# SHAREDLIB=libz.sl
40
41WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
42 -Wmissing-declarations -Wtraditional -Wcast-align \
43 -Wstrict-prototypes -Wmissing-prototypes # -Wconversion
44
45CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
46CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g
47#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g
48LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
49
50OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
51 pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
52 pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
53
54OBJSDLL = $(OBJS:.o=.pic.o)
55
56.SUFFIXES: .c .o .pic.o
57
58.c.o:
59 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
60
61.c.pic.o:
62 $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
63
64all: libpng.a $(LIBSO) pngtest
65
66libpng.a: $(OBJS)
67 $(AR_RC) $@ $(OBJS)
68 $(RANLIB) $@
69
70$(LIBSO): $(LIBSOMAJ)
71 $(LN_SF) $(LIBSOMAJ) $(LIBSO)
72
73$(LIBSOMAJ): $(OBJSDLL)
74 $(LD) -b +s \
75 +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL)
76
77pngtest: pngtest.o $(LIBSO)
78 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
79
80test: pngtest
81 ./pngtest
82
83install:
84 @echo "The $@ target is no longer supported by this makefile."
85 @false
86
87install-static:
88 @echo "The $@ target is no longer supported by this makefile."
89 @false
90
91install-shared:
92 @echo "The $@ target is no longer supported by this makefile."
93 @false
94
95clean:
96 $(RM_F) *.o libpng.a pngtest pngout.png
97 $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
98
99# DO NOT DELETE THIS LINE -- make depend depends on it.
100
101png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
102pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
103pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
104pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
105pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
106pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
107pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
108pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
109pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
110pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
111pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
112pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
113pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
114pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
115pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
116
117pngtest.o: png.h pngconf.h pnglibconf.h
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use