1 | # makefile for SCO OSr5 ELF and Unixware 7 with Native cc
|
---|
2 | # Contributed by Mike Hopkirk (hops at sco.com) modified from Makefile.lnx
|
---|
3 | # force ELF build dynamic linking, SONAME setting in lib and RPATH in app
|
---|
4 | # Copyright (C) 2020-2022 Cosmin Truta
|
---|
5 | # Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
---|
6 | # Copyright (C) 1998 Greg Roelofs
|
---|
7 | # Copyright (C) 1996, 1997 Andreas Dilger
|
---|
8 | #
|
---|
9 | # This code is released under the libpng license.
|
---|
10 | # For conditions of distribution and use, see the disclaimer
|
---|
11 | # and license in png.h
|
---|
12 |
|
---|
13 | # Library name:
|
---|
14 | LIBNAME=libpng16
|
---|
15 | PNGMAJ=16
|
---|
16 |
|
---|
17 | # Shared library names:
|
---|
18 | LIBSO=$(LIBNAME).so
|
---|
19 | LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
---|
20 |
|
---|
21 | # Utilities:
|
---|
22 | CC=cc
|
---|
23 | AR_RC=ar rc
|
---|
24 | RANLIB=echo
|
---|
25 | MKDIR_P=mkdir
|
---|
26 | LN_SF=ln -f -s
|
---|
27 | CP=cp
|
---|
28 | RM_F=/bin/rm -f
|
---|
29 |
|
---|
30 | # Where the zlib library and include files are located
|
---|
31 | #ZLIBLIB=/usr/local/lib
|
---|
32 | #ZLIBINC=/usr/local/include
|
---|
33 | ZLIBLIB=../zlib
|
---|
34 | ZLIBINC=../zlib
|
---|
35 |
|
---|
36 | CPPFLAGS=-I$(ZLIBINC)
|
---|
37 | CFLAGS= -dy -belf -O3
|
---|
38 | LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm
|
---|
39 |
|
---|
40 | # Pre-built configuration
|
---|
41 | # See scripts/pnglibconf.mak for more options
|
---|
42 | PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
---|
43 |
|
---|
44 | OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
---|
45 | pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
|
---|
46 | pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
---|
47 |
|
---|
48 | OBJSDLL = $(OBJS:.o=.pic.o)
|
---|
49 |
|
---|
50 | .SUFFIXES: .c .o .pic.o
|
---|
51 |
|
---|
52 | .c.o:
|
---|
53 | $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
---|
54 |
|
---|
55 | .c.pic.o:
|
---|
56 | $(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
---|
57 |
|
---|
58 | all: libpng.a $(LIBSO) pngtest
|
---|
59 |
|
---|
60 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
---|
61 | $(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
---|
62 |
|
---|
63 | libpng.a: $(OBJS)
|
---|
64 | $(AR_RC) $@ $(OBJS)
|
---|
65 | $(RANLIB) $@
|
---|
66 |
|
---|
67 | $(LIBSO): $(LIBSOMAJ)
|
---|
68 | $(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
---|
69 |
|
---|
70 | $(LIBSOMAJ): $(OBJSDLL)
|
---|
71 | $(CC) -G -Wl,-h,$(LIBSOMAJ) -o $(LIBSOMAJ) \
|
---|
72 | $(OBJSDLL)
|
---|
73 |
|
---|
74 | pngtest: pngtest.o $(LIBSO)
|
---|
75 | LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
---|
76 |
|
---|
77 | test: pngtest
|
---|
78 | ./pngtest
|
---|
79 |
|
---|
80 | install:
|
---|
81 | @echo "The $@ target is no longer supported by this makefile."
|
---|
82 | @false
|
---|
83 |
|
---|
84 | install-static:
|
---|
85 | @echo "The $@ target is no longer supported by this makefile."
|
---|
86 | @false
|
---|
87 |
|
---|
88 | install-shared:
|
---|
89 | @echo "The $@ target is no longer supported by this makefile."
|
---|
90 | @false
|
---|
91 |
|
---|
92 | clean:
|
---|
93 | $(RM_F) *.o libpng.a pngtest pngout.png
|
---|
94 | $(RM_F) $(LIBSO) $(LIBSOMAJ)* pngtest-static pnglibconf.h
|
---|
95 |
|
---|
96 | # DO NOT DELETE THIS LINE -- make depend depends on it.
|
---|
97 |
|
---|
98 | png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
99 | pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
100 | pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
101 | pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
102 | pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
103 | pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
104 | pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
105 | pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
106 | pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
107 | pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
108 | pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
109 | pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
110 | pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
111 | pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
112 | pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
113 |
|
---|
114 | pngtest.o: png.h pngconf.h pnglibconf.h
|
---|