aboutsummaryrefslogtreecommitdiffstats
path: root/GNUmakefile
diff options
context:
space:
mode:
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 8a550ff..3fdfb71 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,13 +1,14 @@
CC := cc
-CCFLAGS := -O3 -std=c99 -pedantic -Wall -Wextra -Wno-missing-field-initalizers
-LDFLAGS := -lraylib #-lm
+CCFLAGS := -O3 -std=c99 -pedantic -Wall -Wextra
+LDFLAGS := -lraylib
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)
+ $(CC) $(CCFLAGS) -o $@ $(OBJS) $(LDFLAGS)
$(DST_DIR)/%.c.o: %.c
mkdir -p $(dir $@)
@@ -16,3 +17,6 @@ $(DST_DIR)/%.c.o: %.c
.PHONY: clean
clean:
rm -r $(DST_DIR)
+
+run:
+ ./physics