| 1 |
# |
| 2 |
# PNG library Makefile for the Fast Light Toolkit (FLTK). |
| 3 |
# |
| 4 |
# Copyright 1997-2011 by Easy Software Products. |
| 5 |
# Copyright 2012-2024 by Bill Spitzak and others. |
| 6 |
# |
| 7 |
# This library is free software. Distribution and use rights are outlined in |
| 8 |
# the file "COPYING" which should have been included with this file. If this |
| 9 |
# file is missing or damaged, see the license at: |
| 10 |
# |
| 11 |
# https://www.fltk.org/COPYING.php |
| 12 |
# |
| 13 |
# Please see the following page on how to report bugs and issues: |
| 14 |
# |
| 15 |
# https://www.fltk.org/bugs.php |
| 16 |
# |
| 17 |
|
| 18 |
include ../makeinclude |
| 19 |
|
| 20 |
# |
| 21 |
# Object files... |
| 22 |
# |
| 23 |
|
| 24 |
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ |
| 25 |
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ |
| 26 |
pngwtran.o pngmem.o pngerror.o pngpread.o \ |
| 27 |
arm/arm_init.o arm/filter_neon_intrinsics.o arm/palette_neon_intrinsics.o \ |
| 28 |
powerpc/powerpc_init.o powerpc/filter_vsx_intrinsics.o |
| 29 |
|
| 30 |
LIBPNG = ../lib/libfltk_png$(LIBEXT) |
| 31 |
|
| 32 |
|
| 33 |
# |
| 34 |
# Make all of the targets... |
| 35 |
# |
| 36 |
|
| 37 |
all: $(LIBPNG) |
| 38 |
|
| 39 |
|
| 40 |
# |
| 41 |
# Clean all of the targets and object files... |
| 42 |
# |
| 43 |
|
| 44 |
clean: |
| 45 |
$(RM) $(OBJS) |
| 46 |
$(RM) $(LIBPNG) |
| 47 |
|
| 48 |
|
| 49 |
# |
| 50 |
# Install everything... |
| 51 |
# |
| 52 |
|
| 53 |
install: $(LIBPNG) |
| 54 |
echo "Installing libfltk_png$(LIBEXT) in $(libdir)..." |
| 55 |
-$(INSTALL_DIR) "$(DESTDIR)$(libdir)" |
| 56 |
$(INSTALL_LIB) $(LIBPNG) "$(DESTDIR)$(libdir)" |
| 57 |
$(RANLIB) "$(DESTDIR)$(libdir)/libfltk_png$(LIBEXT)" |
| 58 |
echo "Installing png headers in $(includedir)/FL/images..." |
| 59 |
-$(INSTALL_DIR) "$(DESTDIR)$(includedir)/FL/images" |
| 60 |
$(INSTALL_DATA) png.h "$(DESTDIR)$(includedir)/FL/images" |
| 61 |
$(INSTALL_DATA) pngconf.h "$(DESTDIR)$(includedir)/FL/images" |
| 62 |
$(INSTALL_DATA) pnglibconf.h "$(DESTDIR)$(includedir)/FL/images" |
| 63 |
$(INSTALL_DATA) pngprefix.h "$(DESTDIR)$(includedir)/FL/images" |
| 64 |
|
| 65 |
|
| 66 |
# |
| 67 |
# Uninstall everything... |
| 68 |
# |
| 69 |
|
| 70 |
uninstall: |
| 71 |
echo "Uninstalling libfltk_png$(LIBEXT) in $(libdir)..." |
| 72 |
$(RM) "$(DESTDIR)$(libdir)/libfltk_png$(LIBEXT)" |
| 73 |
echo "Uninstalling png headers in $(includedir)/FL/images..." |
| 74 |
$(RM) "$(DESTDIR)$(includedir)/FL/images/png.h" |
| 75 |
$(RM) "$(DESTDIR)$(includedir)/FL/images/pngconf.h" |
| 76 |
$(RM) "$(DESTDIR)$(includedir)/FL/images/pnglibconf.h" |
| 77 |
$(RM) "$(DESTDIR)$(includedir)/FL/images/pngprefix.h" |
| 78 |
|
| 79 |
|
| 80 |
# |
| 81 |
# libfltk_png.a |
| 82 |
# |
| 83 |
|
| 84 |
$(LIBPNG): $(OBJS) |
| 85 |
echo Archiving $@... |
| 86 |
$(RM) $@ |
| 87 |
$(LIBCOMMAND) $@ $(OBJS) |
| 88 |
$(RANLIB) $@ |
| 89 |
|
| 90 |
|
| 91 |
# |
| 92 |
# Make dependencies... |
| 93 |
# |
| 94 |
|
| 95 |
depend: $(OBJS:.o=.c) |
| 96 |
makedepend -Y -I.. -f makedepend -w 20 $(OBJS:.o=.c) |
| 97 |
echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > makedepend.tmp |
| 98 |
echo "" >> makedepend.tmp |
| 99 |
grep '^[a-zA-Z]' makedepend | ( LC_ALL=C sort -u -f >> makedepend.tmp; ) |
| 100 |
mv makedepend.tmp makedepend |
| 101 |
|
| 102 |
include makedepend |
| 103 |
|
| 104 |
$(OBJS): ../makeinclude |