the hito embeddable programming language
1CC = clang
2CFLAGS = -isysroot $(shell xcrun --show-sdk-path) -std=c11 -Wall -Wno-parentheses
3LDFLAGS = -isysroot $(shell xcrun --show-sdk-path)
4SRC = main.c source.c util.c lexer.c syntax.c error.c intern.c scope.c bitset.c env.c value.c eval.c builtins.c
5OBJ = $(SRC:.c=.o)
6DEPS = $(OBJ:.o=.d)
7
8all: hito
9
10hito: $(OBJ)
11 $(CC) $(LDFLAGS) $(OBJ) -o $@
12
13%.o: %.c
14 $(CC) $(CFLAGS) -g -MMD -MP -c $< -o $@
15
16-include $(DEPS)
17
18clean:
19 rm -f $(OBJ) hito
20
21compile_commands.json:
22 bear -- make all