diff options
Diffstat (limited to 'tools/lib/lk/Makefile')
-rw-r--r-- | tools/lib/lk/Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/lib/lk/Makefile b/tools/lib/lk/Makefile new file mode 100644 index 000000000000..926cbf3efc7f --- /dev/null +++ b/tools/lib/lk/Makefile | |||
@@ -0,0 +1,35 @@ | |||
1 | include ../../scripts/Makefile.include | ||
2 | |||
3 | # guard against environment variables | ||
4 | LIB_H= | ||
5 | LIB_OBJS= | ||
6 | |||
7 | LIB_H += debugfs.h | ||
8 | |||
9 | LIB_OBJS += $(OUTPUT)debugfs.o | ||
10 | |||
11 | LIBFILE = liblk.a | ||
12 | |||
13 | CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) -fPIC | ||
14 | EXTLIBS = -lpthread -lrt -lelf -lm | ||
15 | ALL_CFLAGS = $(CFLAGS) $(BASIC_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 | ||
16 | ALL_LDFLAGS = $(LDFLAGS) | ||
17 | |||
18 | RM = rm -f | ||
19 | |||
20 | $(LIBFILE): $(LIB_OBJS) | ||
21 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $(OUTPUT)$@ $(LIB_OBJS) | ||
22 | |||
23 | $(LIB_OBJS): $(LIB_H) | ||
24 | |||
25 | $(OUTPUT)%.o: %.c | ||
26 | $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $< | ||
27 | $(OUTPUT)%.s: %.c | ||
28 | $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $< | ||
29 | $(OUTPUT)%.o: %.S | ||
30 | $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $< | ||
31 | |||
32 | clean: | ||
33 | $(RM) $(LIB_OBJS) $(LIBFILE) | ||
34 | |||
35 | .PHONY: clean | ||