aboutsummaryrefslogtreecommitdiffstats
path: root/GNUmakefile
diff options
context:
space:
mode:
authorkotorifan <kotorifan05@gmail.com>2026-04-14 23:30:25 +0200
committerkotorifan <kotorifan05@gmail.com>2026-04-14 23:30:25 +0200
commit8c7882de53f14e522d6ae574ed21b80527772c84 (patch)
tree1542b9290dd28de7e38b299ada2ef81e8882eb1e /GNUmakefile
downloadtrashbinphysics-8c7882de53f14e522d6ae574ed21b80527772c84.tar.gz
Initial Commit
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644
index 0000000..8a550ff
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1,18 @@
+CC := cc
+CCFLAGS := -O3 -std=c99 -pedantic -Wall -Wextra -Wno-missing-field-initalizers
+LDFLAGS := -lraylib #-lm
+SRC_DIR := src
+DST_DIR := dst
+SRCS := $(shell find $(SRC_DIR) -name "*.c" -type f)
+OBJS := $(SRCS:%=$(DST_DIR)/%.o)
+
+physics: $(OBJS)
+ $(CC) $(CCFLAGS) -o $@ $(LDFLAGS)
+
+$(DST_DIR)/%.c.o: %.c
+ mkdir -p $(dir $@)
+ $(CC) $(CCFLAGS) -c $< -o $@
+
+.PHONY: clean
+clean:
+ rm -r $(DST_DIR)