build: Update scripts/makefile.*

Apply the following updates:
 * Tidy up the compiler flag definitions.
 * Update the Darwin, Linux and MSYS makefiles to match the compiler
   flags used in scripts/makefile.clang and scripts/makefile.gcc.
 * Add the `pngtest-static` target in the Darwin makefile, following
   on the Linux makefile.
 * Rewrite some of the implicit make rules to match one another more
   consistently.
 * Make corrections in the copyright years to match git log.
This commit is contained in:
Cosmin Truta
2025-01-21 19:06:43 +02:00
parent 36a16fd761
commit 9cc729b523
25 changed files with 127 additions and 129 deletions

View File

@@ -1,6 +1,6 @@
# makefile for libpng on Solaris 2.x with cc
# Contributed by William L. Sebok, based on makefile.linux
# Copyright (C) 2020-2024 Cosmin Truta
# Copyright (C) 2018-2025 Cosmin Truta
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
# Copyright (C) 1998 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
@@ -36,13 +36,10 @@ SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9
ZLIBLIB=/usr/lib
ZLIBINC=/usr/include
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wmissing-declarations -Wtraditional -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
CFLAGS=$(SUN_CC_FLAGS) # $(WARNMORE) -g
CFLAGS=$(SUN_CC_FLAGS) # -g
ARFLAGS=rc
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm # -g
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
@@ -53,7 +50,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.c
.c.pic.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c