-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (34 loc) · 854 Bytes
/
Copy pathMakefile
File metadata and controls
46 lines (34 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
CC = gcc
FLAGS = -Wall -Wextra -Wpedantic -Werror -Og -g -Iinclude
OBJDIR = bin
TARGET = rum.exe
SRC = $(wildcard src/*.c) $(wildcard src/*/*.c) $(wildcard src/*/*/*.c)
OBJS = $(patsubst src/%, $(OBJDIR)/%, $(SRC:.c=.o))
all: $(TARGET)
mkdir -p temp
cp src/main.c temp/main.c
$(TARGET): $(OBJS)
$(CC) $(FLAGS) -o $@ $^ -DDEBUG
$(OBJDIR)/%.o: src/%.c | $(OBJDIR)
mkdir -p $(@D) && $(CC) $(FLAGS) -DDEBUG -c $< -o $@
$(OBJDIR):
mkdir -p $(OBJDIR)
release:
gcc $(SRC) -Iinclude -DRELEASE -s -flto -O2 -o $(TARGET)
installer:
python scripts/make_installer.py
debug:
bash scripts/debug.sh
run: all
catchsegv -- ./rum temp/main.c
bat log
push:
python scripts/version.py
git add .
git commit -m "updated version"
git push origin dev
publish:
bash scripts/publish_release.sh
clean:
rm -f *.exe *.zip gmon.out log
rm -rf temp bin dist