summaryrefslogtreecommitdiff
path: root/examples/Makefile
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2022-01-16 15:22:16 -0800
committerGreg Ercolano <erco@seriss.com>2022-01-16 15:22:16 -0800
commit6546814a23ac8653916ca9a5e97f2110889ade3d (patch)
tree5d702fd7841f3e60c2383d7a67dc3e8ff1e78567 /examples/Makefile
parent4041608e9487bb59e14593c52aca91054ff79cdf (diff)
For issue #358 - adds examples/cairo-draw-x.cxx
Since this is the first cairo example in the examples directory, it necessarily involved changes to the Makefile and to fltk-config to properly handle the absence/existance of the cairo libs. TBD: Add docs to the cario widget describing coordinate system and how it differs from the default cairo normalized coordinate system.
Diffstat (limited to 'examples/Makefile')
-rw-r--r--examples/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 0ef85508b..00b8acafb 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -6,6 +6,7 @@ SHELL = /bin/sh
# Executables
ALL = browser-simple$(EXEEXT) \
+ cairo-draw-x$(EXEEXT) \
chart-simple$(EXEEXT) \
draggable-group$(EXEEXT) \
howto-add_fd-and-popen$(EXEEXT) \
@@ -44,6 +45,14 @@ ALL = browser-simple$(EXEEXT) \
# default target -- build everything
default all: $(ALL)
+# Special rules for building cairo app
+cairo-draw-x.o: cairo-draw-x.cxx
+ @echo "*** Compile $<..."
+ $(CXX) -I.. $(CXXFLAGS_CAIRO) -c $< -o $@
+cairo-draw-x$(EXEEXT): cairo-draw-x.o
+ @echo "*** Link $<..."
+ $(CXX) $< $(LINKFLTK) $(LINKFLTK_CAIRO) -o $@
+
# clean everything
clean:
$(RM) $(ALL)