mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
56 lines
1.4 KiB
Makefile
56 lines
1.4 KiB
Makefile
# Sample makefile for pngcrush using gcc and make.
|
|
# Glenn Randers-Pehrson
|
|
# Last modified: 7 December 1999
|
|
#
|
|
# Invoke this makefile from a shell prompt in the usual way; for example:
|
|
#
|
|
# make -f makefile.unx
|
|
#
|
|
# This makefile builds a statically linked executable.
|
|
|
|
# macros --------------------------------------------------------------------
|
|
|
|
CC = gcc
|
|
LD = gcc
|
|
RM = rm -f
|
|
CFLAGS = -I. -O -Wall
|
|
# [note that -Wall is a gcc-specific compilation flag ("all warnings on")]
|
|
LDFLAGS =
|
|
O = .o
|
|
E =
|
|
|
|
PNGCRUSH = pngcrush
|
|
|
|
LIBS = -lm
|
|
|
|
OBJS = $(PNGCRUSH)$(O) adler32$(O) crc32$(O) deflate$(O) gzio$(O) \
|
|
infblock$(O) infcodes$(O) inffast$(O) inflate$(O) inftrees$(O) \
|
|
infutil$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
|
|
pngpread$(O) pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \
|
|
pngset$(O) pngtrans$(O) pngwio$(O) pngwrite$(O) pnggccrd$(O) \
|
|
pngwtran$(O) pngwutil$(O) trees$(O) zutil$(O)
|
|
|
|
EXES = $(PNGCRUSH)$(E)
|
|
|
|
|
|
# implicit make rules -------------------------------------------------------
|
|
|
|
.c$(O): png.h pngconf.h zlib.h pngcrush.h cexcept.h
|
|
$(CC) -c $(CFLAGS) $<
|
|
|
|
|
|
# dependencies --------------------------------------------------------------
|
|
|
|
all: $(EXES)
|
|
|
|
|
|
$(PNGCRUSH)$(E): $(OBJS)
|
|
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
|
|
|
$(PNGCRUSH)$(O): $(PNGCRUSH).c png.h pngconf.h zlib.h pngcrush.h cexcept.h
|
|
|
|
# maintenance ---------------------------------------------------------------
|
|
|
|
clean:
|
|
$(RM) $(EXES) $(OBJS)
|