summaryrefslogtreecommitdiff
path: root/doc/examples/filtering/files/hello/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/filtering/files/hello/Makefile')
-rw-r--r--doc/examples/filtering/files/hello/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/examples/filtering/files/hello/Makefile b/doc/examples/filtering/files/hello/Makefile
new file mode 100644
index 000000000..74d776ff4
--- /dev/null
+++ b/doc/examples/filtering/files/hello/Makefile
@@ -0,0 +1,16 @@
+# Sample makefile for hello.c
+#
+.PHONY: all install
+
+all: hello
+
+install:
+ install -d ${DESTDIR}${PREFIX}/bin
+ install -m 755 hello ${DESTDIR}${PREFIX}/bin
+
+hello: hello.c
+ extra_flags=""; \
+ if [ -f "${PREFIX}/share/libhello/default-person.txt" ]; then \
+ extra_flags=-DDEFAULT_PERSON="\"$$(cat ${PREFIX}/share/libhello/default-person.txt)\""; \
+ fi; \
+ $(CC) $< -o $@ $${extra_flags} -Wall -lhello