]>
Commit | Line | Data |
---|---|---|
85c66be1 BP |
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 $(CFLAGS_OPTIMIZE) -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 |