]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - tools/lib/lk/Makefile
tools/vm: Switch to liblk library
[mirror_ubuntu-bionic-kernel.git] / tools / lib / lk / Makefile
CommitLineData
85c66be1
BP
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 $(CFLAGS_OPTIMIZE) -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