From a70f01fda6509abb74e5dce697b6bb94e34ce9c3 Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Mon, 4 Jan 2021 22:16:12 +0900 Subject: [PATCH] Add build target c and python --- Makefile | 7 +++++++ README.md | 3 +++ others/planck.py | 1 + 3 files changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 4d5aba4..d1da5db 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,13 @@ planck: planck.xxd xxd -r -c 8 $< > $@ chmod +x $@ +c: others/planck.c + gcc -Wall -O2 $< -o planck + +python: others/planck.py + cp others/planck.py planck + chmod +x planck + .PHONY: clean clean: rm -f planck diff --git a/README.md b/README.md index b56cdae..1e9f4e8 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,9 @@ xxd -r -c 8 planck.xxd > planck chmod +x planck ``` +There are implementations in C and Python 3 as a reference in `others`. +Try `make c` or `make python` + ## Hello World The hello world program at the beginning looks like this. diff --git a/others/planck.py b/others/planck.py index eaba344..51e1faa 100644 --- a/others/planck.py +++ b/others/planck.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # planck - # Copyright (C) 2021 nineties #