diff options
author | Mango0x45 <thomasvoss@live.com> | 2021-01-18 21:51:35 +0000 |
---|---|---|
committer | Mango0x45 <thomasvoss@live.com> | 2021-01-18 21:51:35 +0000 |
commit | f472887ca69ca82c31f97dfac8f84a3d841564b0 (patch) | |
tree | 37b4e55acb308b8a78fc46c120d3528b95a3acf9 /utils | |
parent | 7e7afb89ce7f115bb30cf8261c65064ee395f955 (diff) | |
download | steve-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/Makefile | 30 |
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) |