From 3d284b88f4682ebaffe3680fdb9d63c6ad4ec7e0 Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Sun, 10 Oct 2021 19:24:20 -0400 Subject: Initial Commit --- .DS_Store | Bin 0 -> 6148 bytes .vscode/configurationCache.log | 1 + .vscode/dryrun.log | 5 + .vscode/settings.json | 3 + .vscode/targets.log | 279 +++++++++++++++++++++++++++++++++++++++++ ProjectMustang.txt | 14 +++ makefile | 20 +++ src/.DS_Store | Bin 0 -> 6148 bytes src/cmd/.DS_Store | Bin 0 -> 6148 bytes src/cmd/coin/coin.c | 15 +++ src/cmd/coin/makefile | 10 ++ src/cmd/dice/dice.c | 15 +++ src/cmd/dice/makefile | 10 ++ src/cmd/echo/echo.c | 17 +++ src/cmd/echo/makefile | 10 ++ src/cmd/makefile | 9 ++ src/makefile | 9 ++ 17 files changed, 417 insertions(+) create mode 100644 .DS_Store create mode 100644 .vscode/configurationCache.log create mode 100644 .vscode/dryrun.log create mode 100644 .vscode/settings.json create mode 100644 .vscode/targets.log create mode 100644 ProjectMustang.txt create mode 100644 makefile create mode 100644 src/.DS_Store create mode 100644 src/cmd/.DS_Store create mode 100644 src/cmd/coin/coin.c create mode 100644 src/cmd/coin/makefile create mode 100644 src/cmd/dice/dice.c create mode 100644 src/cmd/dice/makefile create mode 100644 src/cmd/echo/echo.c create mode 100644 src/cmd/echo/makefile create mode 100644 src/cmd/makefile create mode 100644 src/makefile diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..1c7c9d9 Binary files /dev/null and b/.DS_Store differ diff --git a/.vscode/configurationCache.log b/.vscode/configurationCache.log new file mode 100644 index 0000000..c60bec6 --- /dev/null +++ b/.vscode/configurationCache.log @@ -0,0 +1 @@ +{"buildTargets":["all","clean","cmd/.","coin/.","dice/.","echo/.","install","src"],"launchTargets":["/Users/jmm/Documents/git/ProjectMustang/src/cmd/coin>coin()","/Users/jmm/Documents/git/ProjectMustang/src/cmd/dice>dice()","/Users/jmm/Documents/git/ProjectMustang/src/cmd/echo>echo()"],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":["/Users/jmm/Documents/git/ProjectMustang/src/cmd/coin","/Users/jmm/Documents/git/ProjectMustang/src/cmd/dice","/Users/jmm/Documents/git/ProjectMustang/src/cmd/echo"],"compilerArgs":["-o","echo","echo.c"]},"fileIndex":[["/Users/jmm/Documents/git/ProjectMustang/src/cmd/coin/coin.c",{"uri":{"$mid":1,"fsPath":"/Users/jmm/Documents/git/ProjectMustang/src/cmd/coin/coin.c","path":"/Users/jmm/Documents/git/ProjectMustang/src/cmd/coin/coin.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":[],"forcedInclude":[],"intelliSenseMode":"clang-x64","compilerPath":"/usr/bin/cc","compilerArgs":["-o","coin","coin.c"],"windowsSdkVersion":""}}],["/Users/jmm/Documents/git/ProjectMustang/src/cmd/dice/dice.c",{"uri":{"$mid":1,"fsPath":"/Users/jmm/Documents/git/ProjectMustang/src/cmd/dice/dice.c","path":"/Users/jmm/Documents/git/ProjectMustang/src/cmd/dice/dice.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":[],"forcedInclude":[],"intelliSenseMode":"clang-x64","compilerPath":"/usr/bin/cc","compilerArgs":["-o","dice","dice.c"],"windowsSdkVersion":""}}],["/Users/jmm/Documents/git/ProjectMustang/src/cmd/echo/echo.c",{"uri":{"$mid":1,"fsPath":"/Users/jmm/Documents/git/ProjectMustang/src/cmd/echo/echo.c","path":"/Users/jmm/Documents/git/ProjectMustang/src/cmd/echo/echo.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":[],"forcedInclude":[],"intelliSenseMode":"clang-x64","compilerPath":"/usr/bin/cc","compilerArgs":["-o","echo","echo.c"],"windowsSdkVersion":""}}]]}} \ No newline at end of file diff --git a/.vscode/dryrun.log b/.vscode/dryrun.log new file mode 100644 index 0000000..4edcbd5 --- /dev/null +++ b/.vscode/dryrun.log @@ -0,0 +1,5 @@ +make all -f "/Users/jmm/Documents/git/ProjectMustang/makefile" --dry-run --keep-going --print-directory +make: Entering directory `/Users/jmm/Documents/git/ProjectMustang' +make: Nothing to be done for `all'. +make: Leaving directory `/Users/jmm/Documents/git/ProjectMustang' + diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..65e1ec0 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "makefile.extensionOutputFolder": "./.vscode" +} \ No newline at end of file diff --git a/.vscode/targets.log b/.vscode/targets.log new file mode 100644 index 0000000..1ccc479 --- /dev/null +++ b/.vscode/targets.log @@ -0,0 +1,279 @@ +make all -f "/Users/jmm/Documents/git/ProjectMustang/makefile" --print-data-base --no-builtin-variables --no-builtin-rules --question +# GNU Make 3.81 +# Copyright (C) 2006 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. +# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# This program built for i386-apple-darwin11.3.0 + + +# Make data base, printed on Sun Oct 10 19:18:58 2021 + +# Variables + + +# automatic + +#include +#include + +int +main (void) +{ + int c; + time_t t; + srand((unsigned) time(&t)); + + printf("%s\n", (rand() % 2) ? "Heads" : "Tails"); + + return 0; +} diff --git a/src/cmd/coin/makefile b/src/cmd/coin/makefile new file mode 100644 index 0000000..cf8289d --- /dev/null +++ b/src/cmd/coin/makefile @@ -0,0 +1,10 @@ +all: coin + @cp coin $(PROROOT)/build/bin/coin + +coin: coin.c + $(CC) -o coin coin.c + +clean: + @rm -r coin + +.PHONY: all clean \ No newline at end of file diff --git a/src/cmd/dice/dice.c b/src/cmd/dice/dice.c new file mode 100644 index 0000000..b31670f --- /dev/null +++ b/src/cmd/dice/dice.c @@ -0,0 +1,15 @@ +#include +#include +#include + +int +main (void) +{ + int sides = 6; + time_t t; + srand((unsigned) time(&t)); + + printf("%d\n", (rand() % sides) + 1); + + return 0; +} diff --git a/src/cmd/dice/makefile b/src/cmd/dice/makefile new file mode 100644 index 0000000..5c0e384 --- /dev/null +++ b/src/cmd/dice/makefile @@ -0,0 +1,10 @@ +all: dice + @cp dice $(PROROOT)/build/bin/dice + +dice: dice.c + $(CC) -o dice dice.c + +clean: + @rm -r dice + +.PHONY: all clean \ No newline at end of file diff --git a/src/cmd/echo/echo.c b/src/cmd/echo/echo.c new file mode 100644 index 0000000..4733830 --- /dev/null +++ b/src/cmd/echo/echo.c @@ -0,0 +1,17 @@ +#include +#include + +int +main (int argc, char *argv[]) +{ + int i, nflag = 0; + argc--; + + for (i = 1; i <= argc; i++) { + if (strcmp(argv[i], "-n") == 0) + nflag++; + else + printf("%s%c", argv[i], (i == argc) ? ((nflag == 1) ? '\0' : '\n') : ' '); + } + return 0; +} diff --git a/src/cmd/echo/makefile b/src/cmd/echo/makefile new file mode 100644 index 0000000..0301f23 --- /dev/null +++ b/src/cmd/echo/makefile @@ -0,0 +1,10 @@ +all: echo + @cp echo $(PROROOT)/build/bin/echo + +echo: echo.c + $(CC) -o echo echo.c + +clean: + @rm -r echo + +.PHONY: all clean \ No newline at end of file diff --git a/src/cmd/makefile b/src/cmd/makefile new file mode 100644 index 0000000..52ddd59 --- /dev/null +++ b/src/cmd/makefile @@ -0,0 +1,9 @@ +TOPTARGETS := all clean install + +SUBDIRS := $(wildcard */.) + +$(TOPTARGETS): $(SUBDIRS) +$(SUBDIRS): + $(MAKE) -C $@ $(MAKECMDGOALS) + +.PHONY: $(TOPTARGETS) $(SUBDIRS) \ No newline at end of file diff --git a/src/makefile b/src/makefile new file mode 100644 index 0000000..52ddd59 --- /dev/null +++ b/src/makefile @@ -0,0 +1,9 @@ +TOPTARGETS := all clean install + +SUBDIRS := $(wildcard */.) + +$(TOPTARGETS): $(SUBDIRS) +$(SUBDIRS): + $(MAKE) -C $@ $(MAKECMDGOALS) + +.PHONY: $(TOPTARGETS) $(SUBDIRS) \ No newline at end of file -- cgit v1.2.3