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