blob: c3e30021b6e077a9e949be78e8d57f35bbcc2975 (
plain)
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
|
CFLAGS := -Iinc -g -Og -Wall #-DDEBUG
# Lähtekood
SRC := $(wildcard src/*.c)
OBJ := $(patsubst src/%.c, obj/%.o, $(SRC))
all: lib/interpret
lib/interpret: $(OBJ) | lib
gcc $(CFLAGS) $(OBJ) -o lib/interpret
obj/%.o: src/%.c | obj
gcc -c $(CFLAGS) -o $@ $<
# Dirs
lib:
mkdir lib
obj:
mkdir obj
.PHONY: run
run: lib/interpret
./lib/interpret
.PHONY: clean
clean:
rm -r obj lib
|