"Fossies" - the Fresh Open Source Software Archive

Member "pngcrush-1.8.13/Makefile" (16 Mar 2017, 2615 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": 1.8.11_vs_1.8.12.

    1 # Sample makefile for pngcrush using gcc and GNU make.
    2 # Revised to build with INTEL_SSE2 and ARM_NEON support
    3 # Glenn Randers-Pehrson
    4 # Last modified:  3 October 2016
    5 #
    6 # Invoke this makefile from a shell prompt in the usual way; for example:
    7 #
    8 #	make -f Makefile [OPTIONS=-Dsomething]
    9 #
   10 # This makefile builds a statically linked executable, using the bundled
   11 # libpng and zlib code.
   12 
   13 # macros --------------------------------------------------------------------
   14 
   15 CC = gcc
   16 LD = $(CC)
   17 RM = rm -f
   18 
   19 # On some platforms you might need to comment this out:
   20 CFLAGS += -std=c90 
   21 
   22 CFLAGS += -O3 -funroll-loops -fomit-frame-pointer
   23 
   24 # use unified libpng:
   25 CPPFLAGS = -DLIBPNG_UNIFIED
   26 
   27 CPPFLAGS += ${OPTIONS} -I.
   28 
   29 # We don't need these:
   30 CPPFLAGS += -DNO_GZ
   31 
   32 # Enable high resolution timers:
   33 CPPFLAGS += -DPNGCRUSH_TIMERS=11 -DPNGCRUSH_USE_CLOCK_GETTIME=1
   34 # If you get a linking error with clock_gettime() you might need this:
   35 # LIBS += -lrt
   36 
   37 # Cannot use this with libpng15 and later.
   38 # CPPFLAGS += -DINFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
   39 
   40 LDFLAGS =
   41 O = .o
   42 E =
   43 
   44 PNGCRUSH  = pngcrush
   45 
   46 LIBS += -lm
   47 
   48 # uncomment these 4 lines only if you are NOT using an external copy of zlib:
   49 ZHDR = zlib.h
   50 ZOBJS  = adler32$(O) compress$(O) crc32$(O) deflate$(O) \
   51 	 infback$(O) inffast$(O) inflate$(O) inftrees$(O) \
   52 	 trees$(O) uncompr$(O) zutil$(O)
   53 
   54 # Enable ARM_NEON support
   55 CPPFLAGS += -DPNGCRUSH_USE_ARM_NEON
   56 # Disable ARM_NEON support
   57 # CPPFLAGS += -DPNG_ARM_NEON_OPT=0
   58 
   59 # Enable MIPS-NSA support
   60 CPPFLAGS += -DPNGCRUSH_USE_MPS_MSA
   61 # Disable MIPS-NSA support
   62 # CPPFLAGS += -DPNG_MIPS_MSA_OPT=0
   63 
   64 # Enable INTEL SSE support
   65 CPPFLAGS += -DPNGCRUSH_USE_INTEL_SSE -DPNG_INTEL_SSE
   66 # Disable INTEL SSE support
   67 # CPPFLAGS += -DPNG_INTEL_SSE_OPT=0
   68 
   69 # Enable POWERPC_VSX support
   70 CPPFLAGS += -DPNGCRUSH_USE_POWERPC_VSX
   71 # Disable POWERPC_VSX support
   72 # CPPFLAGS += -DPNG_POWERPC_VSX_OPT=0
   73 
   74 # unified libpng with separate zlib *.o
   75 OBJS  = pngcrush$(O) $(ZOBJS)
   76 
   77 EXES = $(PNGCRUSH)$(E)
   78 
   79 # implicit make rules -------------------------------------------------------
   80 
   81 .c$(O): png.h pngconf.h pngcrush.h cexcept.h pngpriv.h pnglibconf.h $(ZHDR)
   82 	$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
   83 
   84 
   85 # dependencies --------------------------------------------------------------
   86 
   87 all:  $(EXES)
   88 
   89 deflate$(O): deflate.c
   90 	$(CC) -c -DTOO_FAR=32767 $(CPPFLAGS) $(CFLAGS) $<
   91 
   92 pngcrush$(O): pngcrush.c png.h pngconf.h pngcrush.h pnglibconf.h cexcept.h \
   93 	$(ZHDR)
   94 	$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
   95 
   96 $(PNGCRUSH)$(E): $(OBJS)
   97 	$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
   98 
   99 # maintenance ---------------------------------------------------------------
  100 
  101 clean:
  102 	$(RM) $(EXES) $(OBJS)