]> git.tdb.fi Git - ext/libpng.git/blob - scripts/makefile.hp64
Adjust library name to match upstream
[ext/libpng.git] / scripts / makefile.hp64
1 # makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
2 # Copyright (C) 2020-2022 Cosmin Truta
3 # Copyright (C) 1999-2002, 2006, 2009, 2010-2014 Glenn Randers-Pehrson
4 # Copyright (C) 1995 Guy Eric Schalnat, Group 42
5 # Contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
6 #
7 # This code is released under the libpng license.
8 # For conditions of distribution and use, see the disclaimer
9 # and license in png.h
10
11 # Where the zlib library and include files are located
12 ZLIBLIB=/opt/zlib/lib
13 ZLIBINC=/opt/zlib/include
14
15 # Note that if you plan to build a libpng shared library, zlib must also
16 # be a shared library, which zlib's configure does not do.  After running
17 # zlib's configure, edit the appropriate lines of makefile to read:
18 #   CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
19 #   LDSHARED=ld -b
20 #   SHAREDLIB=libz.sl
21
22 # Library name:
23 LIBNAME=libpng16
24 PNGMAJ=16
25
26 # Shared library names:
27 LIBSO=$(LIBNAME).sl
28 LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
29
30 # Utilities:
31 CC=cc
32 AR_RC=ar rc
33 RANLIB=ranlib
34 MKDIR_P=mkdir -p
35 LN_SF=ln -sf
36 CP=cp
37 RM_F=/bin/rm -f
38
39 CPPFLAGS=-I$(ZLIBINC) \
40         -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_UNISTD_H -DUSE_MMAP
41 CFLAGS=-O -Ae -Wl,+vnocompatwarnings +DD64 +Z
42 # Caution: be sure you have built zlib with the same CFLAGS.
43 CCFLAGS=-O -Ae -Wl,+vnocompatwarnings +DD64 +Z
44
45 LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
46
47 # Pre-built configuration
48 # See scripts/pnglibconf.mak for more options
49 PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
50
51 OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
52        pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
53        pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
54
55 OBJSDLL = $(OBJS:.o=.pic.o)
56
57 .SUFFIXES:      .c .o .pic.o
58
59 .c.o:
60         $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
61
62 .c.pic.o:
63         $(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
64
65 all: libpng.a $(LIBSO) pngtest
66
67 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
68         $(CP) $(PNGLIBCONF_H_PREBUILT) $@
69
70 libpng.a: $(OBJS)
71         $(AR_RC) $@ $(OBJS)
72         $(RANLIB) $@
73
74 $(LIBSO): $(LIBSOMAJ)
75         $(LN_SF) $(LIBSOMAJ) $(LIBSO)
76
77 $(LIBSOMAJ): $(OBJSDLL)
78         $(LD) -b +s \
79         +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL)
80
81 pngtest: pngtest.o libpng.a
82         $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
83
84 test: pngtest
85         ./pngtest
86
87 install:
88         @echo "The $@ target is no longer supported by this makefile."
89         @false
90
91 install-static:
92         @echo "The $@ target is no longer supported by this makefile."
93         @false
94
95 install-shared:
96         @echo "The $@ target is no longer supported by this makefile."
97         @false
98
99 clean:
100         $(RM_F) *.o libpng.a pngtest pngout.png
101         $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
102
103 # DO NOT DELETE THIS LINE -- make depend depends on it.
104
105 png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
106 pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
107 pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
108 pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
109 pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
110 pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
111 pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
112 pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
113 pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
114 pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
115 pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
116 pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
117 pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
118 pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
119 pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
120
121 pngtest.o:  png.h pngconf.h pnglibconf.h