"Fossies" - the Fresh Open Source Software Archive

Member "pngcrush-1.8.13/Makefile-nolib" (11 Jan 2017, 1555 Bytes) of package /linux/privat/pngcrush-1.8.13.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "Makefile-nolib": 1.8.10_vs_1.8.11.

    1 # Sample makefile for pngcrush using gcc and GNU make.
    2 # Glenn Randers-Pehrson
    3 # Last modified:  3 October 2016
    4 #
    5 # Invoke this makefile from a shell prompt in the usual way; for example:
    6 #
    7 #	make -f Makefile-nolib [OPTIONS=-Dsomething]
    8 #
    9 # This makefile builds a dynamically linked executable.
   10 
   11 # macros --------------------------------------------------------------------
   12 
   13 # uncomment these 2 lines only if you are using an external copy of libpng:
   14 PNGINC = /usr/local/include
   15 PNGLIB = /usr/local/lib
   16 # uncomment these 2 lines only if you are using an external copy of zlib:
   17 ZINC = /usr/local/include
   18 ZLIB = /usr/local/lib
   19 
   20 CC = gcc
   21 LD = $(CC)
   22 RM = rm -f
   23 
   24 CPPFLAGS = ${OPTIONS} -I$(PNGINC)
   25 
   26 CFLAGS = -g -O3 -fomit-frame-pointer -Wall
   27 # [note that -Wall is a gcc-specific compilation flag ("all warnings on")]
   28 LDFLAGS =
   29 O = .o
   30 E =
   31 
   32 PNGCRUSH  = pngcrush
   33 
   34 LIBS = -L$(PNGLIB) -L$(ZLIB) -lpng -lz -lm
   35 
   36 OBJS  = pngcrush$(O)
   37 
   38 EXES = $(PNGCRUSH)$(E)
   39 
   40 # implicit make rules -------------------------------------------------------
   41 
   42 .c$(O): cexcept.h $(ZHDR)
   43 	$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
   44 
   45 # dependencies --------------------------------------------------------------
   46 
   47 
   48 all:  $(EXES)
   49 
   50 pngcrush$(O): pngcrush.c cexcept.h
   51 	$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
   52 
   53 $(PNGCRUSH)$(E): $(OBJS)
   54 	$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
   55 
   56 # maintenance ---------------------------------------------------------------
   57 
   58 clean:
   59 	$(RM) $(EXES) $(OBJS)
   60 
   61 install:
   62 	mkdir -p $(DESTDIR)/usr/bin/
   63 	cp $(PNGCRUSH)$(E) $(DESTDIR)/usr/bin/
   64 	chmod 0755 $(DESTDIR)/usr/bin/$(PNGCRUSH)$(E)
   65