From 5364db9f1069cb75c51d696c075c6e535fdb0411 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Tue, 16 Apr 2024 19:54:59 +0200 Subject: hello world --- .gitignore | 8 ++++++++ all.do | 3 +++ default.o.do | 4 ++++ license | 21 +++++++++++++++++++++ main.cpp | 7 +++++++ makefile | 8 ++++++++ 6 files changed, 51 insertions(+) create mode 100644 .gitignore create mode 100644 all.do create mode 100644 default.o.do create mode 100644 license create mode 100644 main.cpp create mode 100644 makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..31b4695 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +all + +*.d +*.o +.dep.* +.depend.* +.lock.* +.target.* diff --git a/all.do b/all.do new file mode 100644 index 0000000..5908152 --- /dev/null +++ b/all.do @@ -0,0 +1,3 @@ +DEPS="main.o" +redo-ifchange $DEPS +gcc -o "$3" $DEPS diff --git a/default.o.do b/default.o.do new file mode 100644 index 0000000..ae34754 --- /dev/null +++ b/default.o.do @@ -0,0 +1,4 @@ +redo-ifchange "$2.cpp" +g++ -MD -MF "$2.d" -c -o "$3" "$2.cpp" +read DEPS < "$2.d" +redo-ifchange ${DEPS#*:} diff --git a/license b/license new file mode 100644 index 0000000..6faf3cf --- /dev/null +++ b/license @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 lonkaars + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..e548bf8 --- /dev/null +++ b/main.cpp @@ -0,0 +1,7 @@ +#include + +int main(int argc, char** argv) { + printf("hello world!\n"); + return 0; +} + diff --git a/makefile b/makefile new file mode 100644 index 0000000..41e74eb --- /dev/null +++ b/makefile @@ -0,0 +1,8 @@ +# this makefile transparently forwards all `make` calls to `redo` for convenience + +.PHONY: FORCE + +all: FORCE + @redo $(MAKECMDGOALS) + +$(MAKECMDGOALS): all -- cgit v1.2.3