Added framework for experimenting using Go.
[surreal-numbers] / chapter-1-experiments / Makefile
diff --git a/chapter-1-experiments/Makefile b/chapter-1-experiments/Makefile
new file mode 100644 (file)
index 0000000..e3e9265
--- /dev/null
@@ -0,0 +1,29 @@
+# © 2021 Aaron Taylor <ataylor at subgeniuskitty dot com>
+# See LICENSE.txt file for copyright and license details.
+
+####################################################################################################
+# Program-specific options
+
+SOURCE != ls *.go
+BINARY := ${SOURCE:.go=}
+
+####################################################################################################
+# Globally-mandated options
+
+include ../common/mk.conf
+
+all: ${BINARY}
+
+.go:
+       @${GOCC} ${GOCC_FLAGS} ${GOLD_FLAGS} -o $@ $<
+
+clean:
+       @rm -f ${BINARY}
+
+install: all
+       @mkdir -p ${BINPREFIX}
+       @cp -f ${BINARY} ${BINPREFIX}/surreal-${BINARY}
+       @chmod 755 ${BINPREFIX}/surreal-${BINARY}
+
+uninstall: all
+       @rm -f ${BINPREFIX}/surreal-${BINARY}