summaryrefslogtreecommitdiff
path: root/Makefile
blob: 5f13bd7be5a67a6807f1c59fb84c8dc512317347 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CC=gcc
CFLAGS=-Wall -Wextra -pedantic -ggdb -fsanitize=address
LIBS=-lm -lraylib
OBJECTS=main.o
OUT=sandpile.out
ARGS=

%.o: %.c
	$(CC) $(CFLAGS) -c $^ -o $@ $(LIBS)

$(OUT): $(OBJECTS)
	$(CC) $(CFLAGS) $^ -o $@ $(LIBS)

.PHONY:
clean:
	rm -rfv $(OUT) $(OBJECTS)

.PHONY: run
run: $(OUT)
	./$^ $(ARGS)