aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorc2023-11-25 22:52:11 -0500
committerc2023-11-25 22:52:11 -0500
commit418543ed8d974b06b71694da5c71059eb45897b5 (patch)
tree65f0fc3122acf1d5b25b1d912cdea20dcc454e4c /Makefile
Initial commit.HEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ec33c3c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+name := bf
+cc := cc
+flags := -g
+sources := $(wildcard src/*.c)
+sources := $(filter-out src/parser.c, $(sources)) # exclude the incomplete parser for now.
+objects := $(sources:.c=.o)
+
+$(name): $(objects)
+ $(cc) $(objects) $(flags) -o ./$(name).out
+
+%.o: %.c include/%.h
+ $(cc) -c $(flags) $< -o $@
+
+install:
+ make
+ cp ./$(name).out /usr/local/bin/$(name)
+
+uninstall:
+ rm -f /usr/local/bin/$(name)
+
+clean:
+ rm -f ./$(name).out ./src/*.o
+
+me:
+ @[ "$(USER)" = "root" ] && echo "Okay." || echo "What? Make it yourself."
+
+a sandwich:
+ @exit
+
+.PHONY: install uninstall clean me a sandwich