aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/lk/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/lk/Makefile')
-rw-r--r--tools/lib/lk/Makefile35
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 @@
1include ../../scripts/Makefile.include
2
3# guard against environment variables
4LIB_H=
5LIB_OBJS=
6
7LIB_H += debugfs.h
8
9LIB_OBJS += $(OUTPUT)debugfs.o
10
11LIBFILE = liblk.a
12
13CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) -fPIC
14EXTLIBS = -lpthread -lrt -lelf -lm
15ALL_CFLAGS = $(CFLAGS) $(BASIC_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
16ALL_LDFLAGS = $(LDFLAGS)
17
18RM = 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
32clean:
33 $(RM) $(LIB_OBJS) $(LIBFILE)
34
35.PHONY: clean