diff options
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | all.do | 3 | ||||
-rw-r--r-- | default.o.do | 4 | ||||
-rw-r--r-- | license | 21 | ||||
-rw-r--r-- | main.cpp | 7 | ||||
-rw-r--r-- | makefile | 8 |
6 files changed, 51 insertions, 0 deletions
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.* @@ -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#*:} @@ -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 <cstdio> + +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 |