Ticket #17161: patch-Makefile.diff

File patch-Makefile.diff, 1.4 KB (added by krunk7@…, 16 years ago)

Makefile patch for gdchart

  • Makefile

    old new  
    33# CFLAGS=
    44# CFLAGS=-g -ansi -pedantic
    55
     6# -- Set default prefix and destdir's ------
     7DESTDIR ?=
     8PREFIX ?= /opt/local
     9
     10LD_LIBRARY_PATH=$(PREFIX)/lib
    611# ----- build path -----
    712GDC_INCL=./
    813GDC_LD=./
    914GDC_LIB=libgdc.a
    1015
    1116# ----- install locations -----
    12 PREFIX_INC = /usr/local/include
    13 PREFIX_LIB = /usr/local/lib
     17PREFIX_INC = $(PREFIX)/include
     18PREFIX_LIB = $(PREFIX)/lib
    1419
    1520# INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include
    1621
     
    1823# GDChart requires the gd library - www.boutell.com/gd/
    1924# gd 2.0.28 or better is required (GIF support has returned to libgd)
    2025# if it's not installed in a standard location edit these lines for your installation
    21 GD_INCL=/usr/local/include/
    22 GD_LD=/usr/local/lib/
    23 GD_LIB=libgd.so
     26GD_INCL=$(PREFIX)/include/
     27GD_LD=$(PREFIX)/lib/
     28GD_LIB=libgd.dylib
    2429# a static libgd is also available
    2530# GD_LIB=libgd.a
    2631
     
    135140
    136141# ----- install -----
    137142install: gdc.h gdchart.h gdcpie.h libgdc.a
    138         cp gdc.h  gdchart.h  gdcpie.h $(PREFIX_INC)/
    139         cp libgdc.a $(PREFIX_LIB)/
     143        install -d $(DESTDIR)/$(PREFIX_LIB) $(DESTDIR)/$(PREFIX_INC)
     144        install gdc.h  gdchart.h  gdcpie.h $(DESTDIR)/$(PREFIX_INC)/
     145        install libgdc.a $(DESTDIR)/$(PREFIX_LIB)/
    140146
    141147# --- clean ---
    142148clean: