1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
$NetBSD: patch-ac,v 1.4 2003/06/23 10:19:34 adam Exp $
--- makefile.orig 2003-03-11 04:03:06.000000000 +0100
+++ makefile 2003-06-20 15:22:12.000000000 +0200
@@ -1,4 +1,4 @@
-CC=gcc
+LIB_OBJS= gifencode.o price_conv.o gdc.o gdc_pie.o gdchart.o array_alloc.o
# gcc 2.7.1 or better is required
# CFLAGS=
# CFLAGS=-g -ansi -pedantic
@@ -6,11 +6,11 @@
# ----- build path -----
GDC_INCL=./
GDC_LD=./
-GDC_LIB=libgdc.a
+GDC_LIB=libgdchart.a
# ----- install locations -----
-PREFIX_INC = /usr/local/include
-PREFIX_LIB = /usr/local/lib
+PREFIX_INC = ${PREFIX}/include
+PREFIX_LIB = ${PREFIX}/lib
# INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include
@@ -18,9 +18,9 @@
# GDChart requires the gd library - www.boutell.com/gd/
# libgd 1.8.4 or better is required. Don't use 2.0.0
# if it's not installed in a standard location edit these lines for your installation
-GD_INCL=../gd-1.8.4/
-GD_LD=../gd-1.8.4/
-GD_LIB=libgd.a
+GD_INCL=${BUILDLINK_PREFIX.gd}/include
+GD_LD=${BUILDLINK_PREFIX.gd}/lib
+GD_LIB=libgd.so
# if you're using gd2.x, use these lines
# (it's typically built as a shared lib)
# GD_INCL = ../gd-2.0.0/
@@ -66,7 +66,7 @@
# LIB_PATHS = $(LIB_PATHS) -Xlinker -rpath -Xlinker $(PNG_LD) -Xlinker -rpath -Xlinker $(ZLIB_LD)
-all: libgdc.a gdc_samp1 gdc_samp2 gdc_pie_samp ft_samp
+all: libgdchart.a
# --- compile the samples ---
gdc_pie_samp.o: $(GDC_INCL)gdc.h $(GDC_INCL)gdcpie.h gdc_pie_samp.c
@@ -113,26 +113,25 @@
gdc.h: $(GD_INCL)gd.h $(GD_INCL)gdfonts.h $(GD_INCL)gdfontt.h $(GD_INCL)gdfontmb.h $(GD_INCL)gdfontg.h $(GD_INCL)gdfontl.h $(GDC_INCL)gifencode.h $(GDC_INCL)array_alloc.h
gifencode.o: gifencode.c gifencode.h $(GDC_INCL)gdc.h
- $(CC) $(CFLAGS) -I$(GD_INCL) -c gifencode.c
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -I$(GD_INCL) -c gifencode.c
price_conv.o: price_conv.c
- $(CC) $(CFLAGS) -c price_conv.c
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c price_conv.c
gdc.o: gdc.c $(GDC_INCL)gdc.h
- $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdc.c
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdc.c
gdc_pie.o: $(GDC_INCL)gdc.h $(GDC_INCL)gdcpie.h gdc_pie.c
- $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdc_pie.c
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdc_pie.c
gdchart.o: $(GDC_INCL)gdc.h $(GDC_INCL)gdchart.h gdchart.c
- $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdchart.c
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdchart.c
array_alloc.o: array_alloc.c array_alloc.h
- $(CC) $(CFLAGS) -c array_alloc.c
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c array_alloc.c
-libgdc.a: gifencode.o price_conv.o gdc.o gdc_pie.o gdchart.o array_alloc.o
- ar cr libgdc.a gdc.o gdchart.o gdc_pie.o price_conv.o gifencode.o array_alloc.o
- ranlib libgdc.a
+libgdchart.a: $(LIB_OBJS)
+ $(LIBTOOL) --mode=link $(CC) -o libgdchart.la $(LIB_OBJS:.o=.lo) $(LDFLAGS) -lgd -version-info 0:11 -rpath $(PREFIX)
# --- supporting libraries ---
# should be compile & installed separately
@@ -140,9 +139,9 @@
# cd $(GD_LD) ; make -f Makefile $(GD_LIB)
# ----- install -----
-install: gdc.h gdchart.h gdcpie.h gifencode.h libgdc.a
+install: gdc.h gdchart.h gdcpie.h gifencode.h libgdchart.a
cp gdc.h gdchart.h gdcpie.h gifencode.h $(PREFIX_INC)/
- cp libgdc.a $(PREFIX_LIB)/
+ $(LIBTOOL) --mode=install ${BSD_INSTALL_DATA} libgdchart.la ${PREFIX}/lib
# --- clean ---
clean:
|