]>
Commit | Line | Data |
---|---|---|
33b818e2 | 1 | --- gdchart0.11.5dev/Makefile.orig Tue Mar 11 04:03:06 2003 |
2 | +++ gdchart0.11.5dev/Makefile Wed Jul 2 13:53:07 2003 | |
c23c5b34 JB |
3 | @@ -6,11 +6,11 @@ |
4 | # ----- build path ----- | |
5 | GDC_INCL=./ | |
6 | GDC_LD=./ | |
7 | -GDC_LIB=libgdc.a | |
8 | +GDC_LIB=libgdc.la | |
9 | ||
10 | # ----- install locations ----- | |
11 | -PREFIX_INC = /usr/local/include | |
12 | -PREFIX_LIB = /usr/local/lib | |
13 | +PREFIX_INC = /usr/include | |
14 | +PREFIX_LIB = /usr/lib | |
15 | ||
16 | # INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include | |
17 | ||
33b818e2 | 18 | @@ -18,9 +18,9 @@ |
c23c5b34 | 19 | # GDChart requires the gd library - www.boutell.com/gd/ |
33b818e2 | 20 | # gd 2.0.28 or better is required (GIF support has returned to libgd) |
c23c5b34 | 21 | # if it's not installed in a standard location edit these lines for your installation |
33b818e2 | 22 | -GD_INCL=/usr/local/include/ |
23 | -GD_LD=/usr/local/lib/ | |
24 | -GD_LIB=libgd.so | |
25 | +GD_INCL=/usr/include/ | |
26 | +GD_LD=/usr/lib/ | |
c23c5b34 | 27 | +GD_LIB=-lgd |
33b818e2 | 28 | # a static libgd is also available |
29 | # GD_LIB=libgd.a | |
30 | ||
c23c5b34 JB |
31 | @@ -66,7 +65,7 @@ |
32 | # LIB_PATHS = $(LIB_PATHS) -Xlinker -rpath -Xlinker $(PNG_LD) -Xlinker -rpath -Xlinker $(ZLIB_LD) | |
33 | ||
34 | ||
35 | -all: libgdc.a gdc_samp1 gdc_samp2 gdc_pie_samp ft_samp | |
36 | +all: libgdc.la gdc_samp1 gdc_samp2 gdc_pie_samp ft_samp | |
37 | ||
38 | # --- compile the samples --- | |
39 | gdc_pie_samp.o: $(GDC_INCL)gdc.h $(GDC_INCL)gdcpie.h gdc_pie_samp.c | |
33b818e2 | 40 | @@ -79,54 +79,51 @@ |
c23c5b34 JB |
41 | $(CC) $(CFLAGS) -I$(GDC_INCL) $(DEFS) -c ft_samp.c |
42 | ||
43 | # --- link the samples --- | |
44 | -gdc_samp1: $(GDC_LD)libgdc.a gdc_samp1.o $(GD_LD)/$(GD_LIB) $(GDC_LD)/$(GDC_LIB) | |
45 | - $(CC) -o gdc_samp1 \ | |
46 | +gdc_samp1: $(GDC_LD)libgdc.la gdc_samp1.o | |
47 | + libtool --mode=link $(CC) -o gdc_samp1 \ | |
48 | gdc_samp1.o \ | |
49 | $(LIB_PATHS) \ | |
50 | - -lgdc -lgd -lz -lpng $(LIBS) -lm | |
51 | + libgdc.la -lgd -lz -lpng $(LIBS) -lm | |
52 | ||
53 | -gdc_samp2: $(GDC_LD)libgdc.a gdc_samp2.o $(GD_LD)/$(GD_LIB) $(GDC_LD)/$(GDC_LIB) | |
54 | - $(CC) -o gdc_samp2 \ | |
33b818e2 | 55 | - gdc.o gdchart.o price_conv.o \ |
c23c5b34 JB |
56 | +gdc_samp2: $(GDC_LD)libgdc.la gdc_samp2.o |
57 | + libtool --mode=link $(CC) -o gdc_samp2 \ | |
58 | gdc_samp2.o \ | |
59 | $(LIB_PATHS) \ | |
60 | - -lgdc -lgd -lz -lpng $(LIBS) -lm | |
61 | + libgdc.la -lgd -lz -lpng $(LIBS) -lm | |
62 | ||
63 | -gdc_pie_samp: $(GDC_LD)libgdc.a gdc_pie_samp.o $(GD_LD)/$(GD_LIB) $(GDC_LD)/$(GDC_LIB) | |
64 | - $(CC) -o gdc_pie_samp \ | |
33b818e2 | 65 | - gdc.o gdc_pie.o price_conv.o \ |
c23c5b34 JB |
66 | +gdc_pie_samp: $(GDC_LD)libgdc.la gdc_pie_samp.o |
67 | + libtool --mode=link $(CC) -o gdc_pie_samp \ | |
68 | gdc_pie_samp.o \ | |
69 | $(LIB_PATHS) \ | |
70 | - -lgdc -lgd -lz -lpng $(LIBS) -lm | |
71 | + libgdc.la -lgd -lz -lpng $(LIBS) -lm | |
72 | ||
73 | -ft_samp: $(GDC_LD)libgdc.a ft_samp.o $(GD_LD)/$(GD_LIB) $(GDC_LD)/$(GDC_LIB) | |
74 | - $(CC) -o ft_samp \ | |
33b818e2 | 75 | - gdc.o gdchart.o price_conv.o \ |
c23c5b34 JB |
76 | +ft_samp: $(GDC_LD)libgdc.la ft_samp.o |
77 | + libtool --mode=link $(CC) -o ft_samp \ | |
78 | ft_samp.o \ | |
79 | $(LIB_PATHS) \ | |
80 | - -lgdc -lgd -lz -lpng $(LIBS) -lm | |
81 | + libgdc.la -lgd -lz -lpng $(LIBS) -lm | |
82 | ||
83 | # --- compile the lib --- | |
33b818e2 | 84 | -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)array_alloc.h |
85 | +gdc.h: $(GDC_INCL)array_alloc.h | |
c23c5b34 JB |
86 | |
87 | -price_conv.o: price_conv.c | |
88 | - $(CC) $(CFLAGS) -c price_conv.c | |
89 | +price_conv.lo: price_conv.c | |
90 | + libtool --mode=compile $(CC) $(CFLAGS) -c price_conv.c | |
91 | ||
92 | -gdc.o: gdc.c $(GDC_INCL)gdc.h | |
93 | - $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdc.c | |
94 | +gdc.lo: gdc.c $(GDC_INCL)gdc.h | |
95 | + libtool --mode=compile $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdc.c | |
96 | ||
97 | -gdc_pie.o: $(GDC_INCL)gdc.h $(GDC_INCL)gdcpie.h gdc_pie.c | |
98 | - $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdc_pie.c | |
99 | +gdc_pie.lo: $(GDC_INCL)gdc.h $(GDC_INCL)gdcpie.h gdc_pie.c | |
100 | + libtool --mode=compile $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdc_pie.c | |
101 | ||
102 | -gdchart.o: $(GDC_INCL)gdc.h $(GDC_INCL)gdchart.h gdchart.c | |
103 | - $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdchart.c | |
104 | +gdchart.lo: $(GDC_INCL)gdc.h $(GDC_INCL)gdchart.h gdchart.c | |
105 | + libtool --mode=compile $(CC) $(CFLAGS) -I$(GD_INCL) -I$(GDC_INCL) $(DEFS) -c gdchart.c | |
106 | ||
107 | -array_alloc.o: array_alloc.c array_alloc.h | |
108 | - $(CC) $(CFLAGS) -c array_alloc.c | |
109 | +array_alloc.lo: array_alloc.c array_alloc.h | |
110 | + libtool --mode=compile $(CC) $(CFLAGS) -c array_alloc.c | |
111 | ||
33b818e2 | 112 | -libgdc.a: price_conv.o gdc.o gdc_pie.o gdchart.o array_alloc.o |
113 | - ar cr libgdc.a gdc.o gdchart.o gdc_pie.o price_conv.o array_alloc.o | |
c23c5b34 | 114 | - ranlib libgdc.a |
33b818e2 | 115 | +libgdc.la: price_conv.lo gdc.lo gdc_pie.lo gdchart.lo array_alloc.lo |
c23c5b34 | 116 | + libtool --mode=link $(CC) $(LDFLAGS) -o libgdc.la -rpath $(PREFIX_LIB) -lgd \ |
33b818e2 | 117 | + gdc.lo gdchart.lo gdc_pie.lo price_conv.lo array_alloc.lo |
c23c5b34 JB |
118 | |
119 | # --- supporting libraries --- | |
120 | # should be compile & installed separately | |
33b818e2 | 121 | @@ -134,11 +131,12 @@ |
c23c5b34 JB |
122 | # cd $(GD_LD) ; make -f Makefile $(GD_LIB) |
123 | ||
124 | # ----- install ----- | |
33b818e2 | 125 | -install: gdc.h gdchart.h gdcpie.h libgdc.a |
126 | - cp gdc.h gdchart.h gdcpie.h $(PREFIX_INC)/ | |
c23c5b34 | 127 | - cp libgdc.a $(PREFIX_LIB)/ |
33b818e2 | 128 | +install: gdc.h gdchart.h gdcpie.h libgdc.la |
c23c5b34 | 129 | + install -d $(DESTDIR)$(PREFIX_INC) $(DESTDIR)$(PREFIX_LIB) |
33b818e2 | 130 | + cp gdc.h gdchart.h gdcpie.h $(DESTDIR)$(PREFIX_INC) |
c23c5b34 JB |
131 | + libtool --mode=install install libgdc.la $(DESTDIR)$(PREFIX_LIB) |
132 | ||
133 | # --- clean --- | |
134 | clean: | |
135 | - rm -f *.o *.a gdc_samp1 gdc_samp2 gdc_pie_samp ft_samp | |
33b818e2 | 136 | + rm -f *.lo *.la gdc_samp1 gdc_samp2 gdc_pie_samp ft_samp |
c23c5b34 | 137 |