summaryrefslogtreecommitdiff
path: root/doc/examples/strict-mode/files/libhello/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/strict-mode/files/libhello/Makefile')
-rw-r--r--doc/examples/strict-mode/files/libhello/Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/examples/strict-mode/files/libhello/Makefile b/doc/examples/strict-mode/files/libhello/Makefile
new file mode 100644
index 000000000..cdc20a30a
--- /dev/null
+++ b/doc/examples/strict-mode/files/libhello/Makefile
@@ -0,0 +1,21 @@
+# Sample makefile for hello library
+#
+.PHONY: all install
+
+all: libhello.so libhello.a
+
+install: all
+ install -d ${DESTDIR}${PREFIX}/lib
+ install -d ${DESTDIR}${PREFIX}/include
+ install -m 644 libhello.so ${DESTDIR}${PREFIX}/lib
+ install -m 644 libhello.a ${DESTDIR}${PREFIX}/lib
+ install -m 644 libhello.h ${DESTDIR}${PREFIX}/include
+
+%.o: %.c %.h
+ $(CC) -c $< -o $@ -Wall
+
+libhello.a: libhello.o
+ $(AR) rcs $@ $^
+
+libhello.so: libhello.o
+ $(CC) -shared -o $@ $<