blob: 6a2c01c7eb91cf904a3df133ac303fbc54ea4c79 (
plain) (
blame)
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
|
--- makefile.orig Mon Apr 19 01:22:38 1999
+++ makefile Mon Jun 4 02:25:37 2001
@@ -1,45 +1,49 @@
GDC_INCL = .
-GD_INCL = gd1.3
-GD_LIB = gd1.3
+GD_INCL = $(PREFIX)/include/gd
+GD_LIB = $(PREFIX)/lib
-CC=gcc
-
-all: gdc_samp1 gdc_samp2 gdc_pie_samp
+all: libgdchart.a
# compile the samples
gdc_samp1: gdc.o gdchart.o price_conv.o gdc_samp1.o $(GD_LIB)/libgd.a
- $(CC) -o gdc_samp1 gdc.o gdchart.o price_conv.o gdc_samp1.o -L$(GD_LIB) -lgd -lm
+ $(CC) $(CFLAGS) -o gdc_samp1 gdc.o gdchart.o price_conv.o gdc_samp1.o -L$(GD_LIB) -lgd -lm
gdc_samp1.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp1.c
- $(CC) -I$(GDC_INCL) -c gdc_samp1.c
+ $(CC) $(CFLAGS) -I$(GDC_INCL) -c gdc_samp1.c
gdc_samp2: gdc.o gdchart.o price_conv.o gdc_samp2.o $(GD_LIB)/libgd.a
- $(CC) -o gdc_samp2 gdc.o gdchart.o price_conv.o gdc_samp2.o -L$(GD_LIB) -lgd -lm
+ $(CC) $(CFLAGS) -o gdc_samp2 gdc.o gdchart.o price_conv.o gdc_samp2.o -L$(GD_LIB) -lgd -lm
gdc_samp2.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdc_samp2.c
- $(CC) -I$(GDC_INCL) -c gdc_samp2.c
+ $(CC) $(CFLAGS) -I$(GDC_INCL) -c gdc_samp2.c
gdc_pie_samp: gdc.o gdc_pie.o price_conv.o gdc_pie_samp.o $(GD_LIB)/libgd.a
- $(CC) -o gdc_pie_samp gdc.o gdc_pie.o price_conv.o gdc_pie_samp.o -L$(GD_LIB) -lgd -lm
+ $(CC) $(CFLAGS) -o gdc_pie_samp gdc.o gdc_pie.o price_conv.o gdc_pie_samp.o -L$(GD_LIB) -lgd -lm
gdc_pie_samp.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdcpie.h gdc_pie_samp.c
- $(CC) -I$(GDC_INCL) -c gdc_pie_samp.c
+ $(CC) $(CFLAGS) -I$(GDC_INCL) -c gdc_pie_samp.c
# --- compile the lib ---
price_conv.o: price_conv.c
- $(CC) -c price_conv.c
+ $(CC) $(CFLAGS) -c price_conv.c
gdc.o: gdc.c gdc.h
- $(CC) -I$(GD_INCL) -I$(GDC_INCL) -c gdc.c
+ $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) -c gdc.c
gdc_pie.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdcpie.h gdc_pie.c
- $(CC) -I$(GD_INCL) -I$(GDC_INCL) -c gdc_pie.c
+ $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) -c gdc_pie.c
gdchart.o: $(GDC_INCL)/gdc.h $(GDC_INCL)/gdchart.h gdchart.c
- $(CC) -I$(GD_INCL) -I$(GDC_INCL) -c gdchart.c
+ $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) -c gdchart.c
$(GD_LIB)/libgd.a:
cd $(GD_LIB) ; make -f Makefile libgd.a
+
+libgdchart.a: gdc.o gdc_pie.o gdchart.o price_conv.o
+ $(AR) rc libgdchart.a gdc.o gdc_pie.o gdchart.o price_conv.o
+ @if [ -x $(RANLIB) ] ; then \
+ $(RANLIB) libgdchart.a; \
+ fi;
# --- clean ---
clean:
|