-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (23 loc) · 852 Bytes
/
Makefile
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
SRC = src/
CFLAGS = -DLINUX_BUILD -Wall -Wpedantic -Werror -Wextra -g -O0 -std=c11
OBJDEST = objs/
EXEC = bin/kforth
hash_map.o: $(SRC)hash_map.c
cc -c $(CFLAGS) $< -o $(OBJDEST)$@
forth_vm.o: $(SRC)forth_vm.c
cc -c $(CFLAGS) $< -o $(OBJDEST)$@
forth_vm_backend.o: $(SRC)forth_vm_backend.c
cc -c $(CFLAGS) $< -o $(OBJDEST)$@
forth_parser.o: $(SRC)forth_parser.c
cc -c $(CFLAGS) $< -o $(OBJDEST)$@
token_list.o: $(SRC)token_list.c
cc -c $(CFLAGS) $< -o $(OBJDEST)$@
lexer.o: $(SRC)lexer.c
cc -c $(CFLAGS) $< -o $(OBJDEST)$@
main.o: $(SRC)main.c
cc -c $(CFLAGS) $< -o $(OBJDEST)$@
kforth: main.o lexer.o forth_parser.o forth_vm.o token_list.o hash_map.o forth_vm_backend.o
cc objs/main.o objs/lexer.o objs/forth_parser.o objs/forth_vm.o objs/token_list.o objs/hash_map.o objs/forth_vm_backend.o -o bin/kforth
clean:
rm bin/*
rm objs/*