mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
The extensible file description array that grew in the perf_evlist class
can be useful for other tools, as it is not something that only evlists
need, so move it to tools/lib/api/fd to ease sharing it.
v2: Don't use {} like in:
libapi_dirs:
$(QUIET_MKDIR)mkdir -p $(OUTPUT){fs,fd}/
in Makefiles, as it will not work in some systems, as in ubuntu13.10.
v3: Add fd/*.[ch] to LIBAPIKFS_SOURCES (Fix from Jiri Olsa)
v4: Leave the fcntl(fd, O_NONBLOCK) in the evlist layer, remains to
be checked if it is really needed there, but has no place in the
fdarray class (Fix from Jiri Olsa)
v5: Remove evlist details from fdarray grow/filter tests. Improve it a
bit doing more tests about expected internal state.
Cc: Adrian Hunter <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jean Pihet <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
50 lines
1.3 KiB
Makefile
50 lines
1.3 KiB
Makefile
include ../../scripts/Makefile.include
|
|
include ../../perf/config/utilities.mak # QUIET_CLEAN
|
|
|
|
CC = $(CROSS_COMPILE)gcc
|
|
AR = $(CROSS_COMPILE)ar
|
|
|
|
# guard against environment variables
|
|
LIB_H=
|
|
LIB_OBJS=
|
|
|
|
LIB_H += fs/debugfs.h
|
|
LIB_H += fs/fs.h
|
|
# See comment below about piggybacking...
|
|
LIB_H += fd/array.h
|
|
|
|
LIB_OBJS += $(OUTPUT)fs/debugfs.o
|
|
LIB_OBJS += $(OUTPUT)fs/fs.o
|
|
# XXX piggybacking here, need to introduce libapikfd, or rename this
|
|
# to plain libapik.a and make it have it all api goodies
|
|
LIB_OBJS += $(OUTPUT)fd/array.o
|
|
|
|
LIBFILE = libapikfs.a
|
|
|
|
CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) -fPIC
|
|
EXTLIBS = -lelf -lpthread -lrt -lm
|
|
ALL_CFLAGS = $(CFLAGS) $(BASIC_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
|
ALL_LDFLAGS = $(LDFLAGS)
|
|
|
|
RM = rm -f
|
|
|
|
$(LIBFILE): $(LIB_OBJS)
|
|
$(QUIET_AR)$(RM) $@ && $(AR) rcs $(OUTPUT)$@ $(LIB_OBJS)
|
|
|
|
$(LIB_OBJS): $(LIB_H)
|
|
|
|
libapi_dirs:
|
|
$(QUIET_MKDIR)mkdir -p $(OUTPUT)fd $(OUTPUT)fs
|
|
|
|
$(OUTPUT)%.o: %.c libapi_dirs
|
|
$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
|
|
$(OUTPUT)%.s: %.c libapi_dirs
|
|
$(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
|
|
$(OUTPUT)%.o: %.S libapi_dirs
|
|
$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
|
|
|
|
clean:
|
|
$(call QUIET_CLEAN, libapi) $(RM) $(LIB_OBJS) $(LIBFILE)
|
|
|
|
.PHONY: clean
|