File: Makefile.AmigaOS

package info (click to toggle)
agg 2.5%2Bdfsg1-11
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 5,656 kB
  • ctags: 11,347
  • sloc: cpp: 64,972; ansic: 11,272; makefile: 3,645; sh: 31
file content (398 lines) | stat: -rw-r--r-- 11,424 bytes parent folder | download | duplicates (6)
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
#
# Makefile for AmigaOS 4.0
#

CXX = g++
CXXFLAGS = -mcrt=clib2 -O3 -Iinclude -Igpc -Ifont_freetype
CXXLIBS = -Llib -lagg
CC = gcc
CFLAGS = -mcrt=clib2 -O3 -Igpc
AR = ar
ARFLAGS = cr
STRIP = strip -R.comment

LIBNAME = lib/libagg.a
SVGNAME = bin/svg_test

EXAMPLES =\
bin/aa_demo \
bin/aa_test \
bin/alpha_gradient \
bin/alpha_mask \
bin/alpha_mask2 \
bin/alpha_mask3 \
bin/bezier_div \
bin/bspline \
bin/circles \
bin/component_rendering \
bin/compositing \
bin/compositing2 \
bin/conv_contour \
bin/conv_dash_marker \
bin/conv_stroke \
bin/distortions \
bin/flash_rasterizer \
bin/flash_rasterizer2 \
bin/gamma_correction \
bin/gamma_ctrl \
bin/gamma_tuner \
bin/gouraud \
bin/gouraud_mesh \
bin/gpc_test \
bin/gradients \
bin/graph_test \
bin/idea \
bin/image_alpha \
bin/image_filters \
bin/image_filters2 \
bin/image_fltr_graph \
bin/image_perspective \
bin/image_resample \
bin/image_transforms \
bin/image1 \
bin/line_patterns_clip \
bin/line_patterns \
bin/lion \
bin/lion_lens \
bin/lion_outline \
bin/mol_view \
bin/multi_clip \
bin/pattern_fill \
bin/pattern_perspective \
bin/pattern_resample \
bin/perspective \
bin/polymorphic_renderer \
bin/raster_text \
bin/rasterizers \
bin/rasterizers2 \
bin/rounded_rect \
bin/scanline_boolean \
bin/scanline_boolean2 \
bin/simple_blur \
bin/trans_polar

FREETYPE_EXAMPLES=\
bin/freetype_test \
bin/trans_curve1_ft \
bin/trans_curve2_ft

PLATFORM_SRC=\
src/platform/AmigaOS/agg_platform_support.cpp

FREETYPE_SRC=\
font_freetype/agg_font_freetype.cpp

LIB_CXXSRC=\
src/agg_arc.cpp \
src/agg_arrowhead.cpp \
src/agg_bezier_arc.cpp \
src/agg_bspline.cpp \
src/agg_curves.cpp \
src/agg_embedded_raster_fonts.cpp \
src/agg_gsv_text.cpp \
src/agg_image_filters.cpp \
src/agg_line_aa_basics.cpp \
src/agg_line_profile_aa.cpp \
src/agg_rounded_rect.cpp \
src/agg_sqrt_tables.cpp \
src/agg_trans_affine.cpp \
src/agg_trans_double_path.cpp \
src/agg_trans_single_path.cpp \
src/agg_trans_warp_magnifier.cpp \
src/agg_vcgen_bspline.cpp \
src/agg_vcgen_contour.cpp \
src/agg_vcgen_dash.cpp \
src/agg_vcgen_markers_term.cpp \
src/agg_vcgen_smooth_poly1.cpp \
src/agg_vcgen_stroke.cpp \
src/agg_vpgen_clip_polygon.cpp \
src/agg_vpgen_clip_polyline.cpp \
src/agg_vpgen_segmentator.cpp \
src/ctrl/agg_bezier_ctrl.cpp \
src/ctrl/agg_cbox_ctrl.cpp \
src/ctrl/agg_gamma_ctrl.cpp \
src/ctrl/agg_gamma_spline.cpp \
src/ctrl/agg_polygon_ctrl.cpp \
src/ctrl/agg_rbox_ctrl.cpp \
src/ctrl/agg_scale_ctrl.cpp \
src/ctrl/agg_slider_ctrl.cpp \
src/ctrl/agg_spline_ctrl.cpp

LIB_CSRC=\
gpc/gpc.c

SVG_SRC=\
examples/svg_viewer/agg_svg_parser.cpp \
examples/svg_viewer/agg_svg_path_renderer.cpp \
examples/svg_viewer/agg_svg_path_tokenizer.cpp \
examples/svg_viewer/svg_test.cpp \
$(PLATFORM_SRC)

PLATFORM_OBJ = $(PLATFORM_SRC:.cpp=.o)
FREETYPE_OBJ = $(FREETYPE_SRC:.cpp=.o)
LIB_OBJ = $(LIB_CXXSRC:.cpp=.o) $(LIB_CSRC:.c=.o)
SVG_OBJ = $(SVG_SRC:.cpp=.o)


#
# Targets
#
.PHONY : help all lib examples svg freetype clean install wget

help:
	@Echo Requirements:
	@Echo - AmigaOS 4.0
	@Echo - SDK 51.22
	@Echo - optional: libexpat.a for SVG viewer
	@Echo - optional: libft2.a for FreeType examples
	@Echo ""
	@Echo Targets:
	@Echo all - build AGG library and all tests/examples
	@Echo lib - build AGG library only
	@Echo examples - build AGG library and examples
	@Echo svg - build AGG library and SVG viewer
	@Echo freetype - build AGG library and FreeType examples
	@Echo clean - clean all build files
	@Echo install - build AGG library and install into SDK
	@Echo wget - download and install example test files with wget

all: lib examples svg freetype
	$(STRIP) $(EXAMPLES) $(SVGNAME) $(FREETYPE_EXAMPLES)

lib: $(LIBNAME)

examples: lib $(EXAMPLES)

svg: lib $(SVGNAME)

freetype: lib $(FREETYPE_EXAMPLES)

clean:
	-@Delete *>NIL: FORCE QUIET examples/#?.o
	-@Delete *>NIL: FORCE QUIET $(PLATFORM_OBJ) $(FREETYPE_OBJ) $(LIB_OBJ) $(SVG_OBJ)
	-@Delete *>NIL: FORCE QUIET ALL lib bin

install: lib
	-@Copy CLONE $(LIBNAME) SDK:Local/clib2/lib
	-@Copy CLONE ALL include/#?.h SDK:Local/common/include/agg
	-@Copy CLONE ALL gpc/#?.h SDK:Local/common/include/gpc

$(LIBNAME): $(LIB_OBJ)
	$(AR) $(ARFLAGS) $@ $^

$(SVGNAME): $(SVG_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS) -lexpat


#
# Examples binaries
#
bin/aa_test: examples/aa_test.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/aa_demo: examples/aa_demo.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/alpha_gradient: examples/alpha_gradient.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/alpha_mask: examples/alpha_mask.o examples/parse_lion.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/alpha_mask2: examples/alpha_mask2.o examples/parse_lion.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/alpha_mask3: examples/alpha_mask3.o examples/make_arrows.o examples/make_gb_poly.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/bezier_div: examples/bezier_div.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/bspline: examples/bspline.o examples/interactive_polygon.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/circles: examples/circles.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/component_rendering: examples/component_rendering.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/compositing: examples/compositing.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/compositing2: examples/compositing2.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/conv_contour: examples/conv_contour.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/conv_dash_marker: examples/conv_dash_marker.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/conv_stroke: examples/conv_stroke.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/distortions: examples/distortions.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/flash_rasterizer: examples/flash_rasterizer.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/flash_rasterizer2: examples/flash_rasterizer2.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/gamma_correction: examples/gamma_correction.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/gamma_ctrl: examples/gamma_ctrl.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/gamma_tuner: examples/gamma_tuner.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/gouraud: examples/gouraud.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/gouraud_mesh: examples/gouraud_mesh.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/gpc_test: examples/gpc_test.o examples/make_arrows.o examples/make_gb_poly.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/gradients: examples/gradients.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/graph_test: examples/graph_test.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/idea: examples/idea.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/image1: examples/image1.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/image_alpha: examples/image_alpha.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/image_filters: examples/image_filters.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/image_filters2: examples/image_filters2.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/image_fltr_graph: examples/image_fltr_graph.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/image_perspective: examples/image_perspective.o examples/interactive_polygon.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/image_resample: examples/image_resample.o examples/interactive_polygon.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/image_transforms: examples/image_transforms.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/line_patterns: examples/line_patterns.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/line_patterns_clip: examples/line_patterns_clip.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/lion: examples/lion.o examples/parse_lion.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/lion_lens: examples/lion_lens.o examples/parse_lion.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/lion_outline: examples/lion_outline.o examples/parse_lion.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/mol_view: examples/mol_view.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/multi_clip: examples/multi_clip.o examples/parse_lion.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/pattern_fill: examples/pattern_fill.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/pattern_perspective: examples/pattern_perspective.o examples/interactive_polygon.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/pattern_resample: examples/pattern_resample.o examples/interactive_polygon.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/perspective: examples/perspective.o examples/interactive_polygon.o examples/parse_lion.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/polymorphic_renderer: examples/polymorphic_renderer.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/rasterizers: examples/rasterizers.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/rasterizers2: examples/rasterizers2.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/raster_text: examples/raster_text.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/rounded_rect: examples/rounded_rect.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/scanline_boolean: examples/scanline_boolean.o examples/interactive_polygon.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/scanline_boolean2: examples/scanline_boolean2.o examples/make_arrows.o examples/make_gb_poly.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/simple_blur: examples/simple_blur.o examples/parse_lion.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/trans_polar: examples/trans_polar.o $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS)

bin/freetype_test: examples/freetype_test.o $(FREETYPE_OBJ) $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS) -lft2

bin/trans_curve1_ft: examples/trans_curve1_ft.o examples/interactive_polygon.o $(FREETYPE_OBJ) $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS) -lft2

bin/trans_curve2_ft: examples/trans_curve2_ft.o examples/interactive_polygon.o $(FREETYPE_OBJ) $(PLATFORM_OBJ)
	$(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS) -lft2


#
# Examples files
#
wget:
	wget http://www.antigrain.com/svg/tiger.svg
	move tiger.svg bin
	wget http://www.antigrain.com/agg.bmp
	move agg.bmp bin
	wget http://www.antigrain.com/compositing.bmp
	move compositing.bmp bin
	wget http://www.antigrain.com/spheres.bmp
	move spheres.bmp bin
	wget http://www.antigrain.com/shapes.txt
	move shapes.txt bin
	wget http://www.antigrain.com/1.sdf
	move 1.sdf bin
	wget http://www.antigrain.com/line_patterns.bmp.zip
	xadunfile line_patterns.bmp.zip bin overwrite
	delete line_patterns.bmp.zip
	wget http://www.antigrain.com/timesi.zip
	xadunfile timesi.zip bin overwrite
	delete timesi.zip


#
# Pattern Rules
#
%.o: %.cpp
	@MakeDir lib bin force
	$(CXX) -c $(CXXFLAGS) $< -o $@

%.o: %.c
	@MakeDir lib bin force
	$(CC) -c $(CFLAGS) $< -o $@