# # Makefile for AmigaOS 4.0 # .PHONY : help all setup lib examples svg freetype clean install CXX = g++ CXXFLAGS = -O3 -Iinclude -Igpc -Ifont_freetype CXXLIBS = -Llib -lagg CC = gcc CFLAGS = -O3 AR = ar ARFLAGS = cr STRIP = strip -R.comment AGGLIBNAME = lib/libagg.a SVGNAME = bin/svg_test EXAMPLES =\ bin/aa_test \ bin/aa_demo \ bin/alpha_gradient \ bin/alpha_mask \ bin/alpha_mask2 \ bin/alpha_mask3 \ bin/bspline \ bin/circles \ bin/component_rendering \ bin/conv_contour \ bin/conv_dash_marker \ bin/conv_stroke \ bin/distortions \ bin/gamma_correction \ bin/gamma_ctrl \ bin/gouraud \ bin/gpc_test \ bin/gradients \ bin/graph_test \ bin/idea \ bin/image_alpha \ bin/image_filters \ bin/image_fltr_graph \ bin/image_perspective \ bin/image_transforms \ bin/image1 \ bin/line_patterns \ bin/lion \ bin/lion_lens \ bin/lion_outline \ bin/mol_view \ bin/multi_clip \ bin/pattern_fill \ bin/pattern_perspective \ 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_path_storage.cpp \ src/agg_rasterizer_scanline_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=\ svg/agg_svg_parser.cpp \ svg/agg_svg_path_renderer.cpp \ svg/agg_svg_path_tokenizer.cpp \ svg/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 # help: @Echo Requirements: @Echo - AmigaOS 4.0 @Echo - SDK 51.5 @Echo - GCC 3.4.2 @Echo - clib2 1.188 @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 "" all: setup lib examples svg freetype $(STRIP) $(EXAMPLES) $(SVGNAME) $(FREETYPE_EXAMPLES) setup: -@MakeDir >NIL: lib bin lib: setup $(AGGLIBNAME) 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 $(AGGLIBNAME) SDK:Local/clib2/lib -@Copy CLONE ALL include/#?.h SDK:Local/clib2/include/agg -@Copy CLONE ALL gpc/#?.h SDK:Local/clib2/include/gpc $(AGGLIBNAME): $(LIB_OBJ) $(AR) $(ARFLAGS) $(AGGLIBNAME) $^ $(SVGNAME): $(SVG_OBJ) $(CXX) $(CXXFLAGS) $^ -o $@ $(CXXLIBS) -lexpat 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/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/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/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/gouraud: examples/gouraud.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_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_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/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/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 # # Pattern Rules # %.o: %.cpp $(CXX) -c $(CXXFLAGS) $*.cpp -o $@ %.o: %.c $(CC) -c $(CFLAGS) $*.c -o $@