-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (34 loc) · 738 Bytes
/
Makefile
File metadata and controls
46 lines (34 loc) · 738 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
include libvector.mk
SRCS_OBJS := $(patsubst %.c,$(OBJS_DIR)/%.o,$(SRCS))
$(OBJS_DIR)/%.o:$(SRCS_DIR)/%.c
@mkdir -vp $(dir $@)
$(CC) \
$(CFLAGS) \
-MMD \
-MP \
-o $@ \
-c $< \
-I $(INCS_DIR)
all: $(NAME)
-include $(SRCS_OBJS:.o=.d)
$(NAME): $(SRCS_OBJS)
ar rc \
$(NAME) \
$(SRCS_OBJS)
g: CFLAGS += $(CFLAGS_DBG)
g: all
clean:
rm -rf $(OBJS_DIR)
rm -rf .cache
rm -rf .dSYM
format:
find . \( -name "*.c" -o -name "*.h" \) \
-type f \
-exec \
clang-format \
--verbose \
-style=file -i {} \;
fclean: clean
rm -rf $(NAME)
re: fclean all
.PHONY : all clean g fclean re format sparse