aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMango0x45 <thomasvoss@live.com>2021-01-18 21:51:35 +0000
committerMango0x45 <thomasvoss@live.com>2021-01-18 21:51:35 +0000
commitf472887ca69ca82c31f97dfac8f84a3d841564b0 (patch)
tree37b4e55acb308b8a78fc46c120d3528b95a3acf9 /utils
parent7e7afb89ce7f115bb30cf8261c65064ee395f955 (diff)
downloadsteve-bot-f472887ca69ca82c31f97dfac8f84a3d841564b0.tar
steve-bot-f472887ca69ca82c31f97dfac8f84a3d841564b0.tar.gz
steve-bot-f472887ca69ca82c31f97dfac8f84a3d841564b0.tar.bz2
steve-bot-f472887ca69ca82c31f97dfac8f84a3d841564b0.tar.lz
steve-bot-f472887ca69ca82c31f97dfac8f84a3d841564b0.tar.xz
steve-bot-f472887ca69ca82c31f97dfac8f84a3d841564b0.tar.zst
steve-bot-f472887ca69ca82c31f97dfac8f84a3d841564b0.zip
Add Makefile
Diffstat (limited to 'utils')
-rw-r--r--utils/Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/utils/Makefile b/utils/Makefile
new file mode 100644
index 0000000..bfd55de
--- /dev/null
+++ b/utils/Makefile
@@ -0,0 +1,30 @@
+target := math
+objs := math.o
+
+CC := gcc
+CFLAGS := -O3 -std=c99 -pedantic -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-result
+
+all: $(target)
+
+###
+# Automatic dependency tracking
+#
+deps := $(patsubst %.o,%.d,$(objs))
+-include $(deps)
+DEPFLAGS = -MMD -MF $(@:.o=.d)
+
+###
+# Compile the program
+#
+$(target): $(objs)
+ $(CC) $(CFLAGS) -o $@ $^
+
+%.o: src/%.c
+ $(CC) $(CFLAGS) -c $< $(DEPFLAGS)
+
+###
+# Phony targets
+#
+.PHONY: clean
+clean:
+ rm -f $(target) $(objs) $(deps)