2013-09-30 08:08:24 +00:00
|
|
|
|
2013-09-30 11:37:10 +00:00
|
|
|
FILES= \
|
2013-12-21 05:48:11 +00:00
|
|
|
test-all.bin \
|
|
|
|
test-backtrace.bin \
|
|
|
|
test-bionic.bin \
|
|
|
|
test-dwarf.bin \
|
|
|
|
test-fortify-source.bin \
|
2014-07-14 10:02:53 +00:00
|
|
|
test-sync-compare-and-swap.bin \
|
2013-12-21 05:48:11 +00:00
|
|
|
test-glibc.bin \
|
|
|
|
test-gtk2.bin \
|
|
|
|
test-gtk2-infobar.bin \
|
|
|
|
test-hello.bin \
|
|
|
|
test-libaudit.bin \
|
|
|
|
test-libbfd.bin \
|
|
|
|
test-liberty.bin \
|
|
|
|
test-liberty-z.bin \
|
|
|
|
test-cplus-demangle.bin \
|
|
|
|
test-libelf.bin \
|
|
|
|
test-libelf-getphdrnum.bin \
|
|
|
|
test-libelf-mmap.bin \
|
|
|
|
test-libnuma.bin \
|
|
|
|
test-libperl.bin \
|
|
|
|
test-libpython.bin \
|
|
|
|
test-libpython-version.bin \
|
|
|
|
test-libslang.bin \
|
|
|
|
test-libunwind.bin \
|
|
|
|
test-libunwind-debug-frame.bin \
|
|
|
|
test-stackprotector-all.bin \
|
2014-02-19 15:52:56 +00:00
|
|
|
test-timerfd.bin \
|
2014-10-23 21:16:03 +00:00
|
|
|
test-libdw-dwarf-unwind.bin \
|
|
|
|
test-compile-32.bin \
|
|
|
|
test-compile-x32.bin
|
2013-09-30 08:08:24 +00:00
|
|
|
|
2014-01-15 10:44:08 +00:00
|
|
|
CC := $(CROSS_COMPILE)gcc -MD
|
|
|
|
PKG_CONFIG := $(CROSS_COMPILE)pkg-config
|
2013-09-30 11:51:28 +00:00
|
|
|
|
2013-09-30 08:08:24 +00:00
|
|
|
all: $(FILES)
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
BUILD = $(CC) $(CFLAGS) -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
|
2013-09-30 08:08:24 +00:00
|
|
|
|
|
|
|
###############################
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-all.bin:
|
2014-01-15 10:44:08 +00:00
|
|
|
$(BUILD) -Werror -fstack-protector-all -O2 -Werror -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl
|
2013-10-01 12:14:31 +00:00
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-hello.bin:
|
2013-09-30 08:08:24 +00:00
|
|
|
$(BUILD)
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-stackprotector-all.bin:
|
2013-09-30 11:48:44 +00:00
|
|
|
$(BUILD) -Werror -fstack-protector-all
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-fortify-source.bin:
|
2013-10-07 07:38:28 +00:00
|
|
|
$(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-bionic.bin:
|
2013-09-30 12:11:46 +00:00
|
|
|
$(BUILD)
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-libelf.bin:
|
2013-09-30 12:20:25 +00:00
|
|
|
$(BUILD) -lelf
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-glibc.bin:
|
2013-10-07 08:34:20 +00:00
|
|
|
$(BUILD)
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-dwarf.bin:
|
2013-10-07 08:35:39 +00:00
|
|
|
$(BUILD) -ldw
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-libelf-mmap.bin:
|
2013-09-30 13:02:28 +00:00
|
|
|
$(BUILD) -lelf
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-libelf-getphdrnum.bin:
|
2013-09-30 12:35:27 +00:00
|
|
|
$(BUILD) -lelf
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-libnuma.bin:
|
2013-09-30 11:37:10 +00:00
|
|
|
$(BUILD) -lnuma
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-libunwind.bin:
|
2013-12-10 12:24:04 +00:00
|
|
|
$(BUILD) -lelf
|
2013-09-30 12:45:44 +00:00
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-libunwind-debug-frame.bin:
|
2013-12-10 12:24:04 +00:00
|
|
|
$(BUILD) -lelf
|
2013-11-14 07:25:24 +00:00
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-libaudit.bin:
|
2013-09-30 12:55:31 +00:00
|
|
|
$(BUILD) -laudit
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-libslang.bin:
|
2013-09-30 12:57:54 +00:00
|
|
|
$(BUILD) -I/usr/include/slang -lslang
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-gtk2.bin:
|
2014-01-15 10:44:08 +00:00
|
|
|
$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
|
2013-09-30 13:01:56 +00:00
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-gtk2-infobar.bin:
|
2014-01-15 10:44:08 +00:00
|
|
|
$(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
|
2013-09-30 13:08:30 +00:00
|
|
|
|
2013-09-30 13:15:36 +00:00
|
|
|
grep-libs = $(filter -l%,$(1))
|
|
|
|
strip-libs = $(filter-out -l%,$(1))
|
|
|
|
|
|
|
|
PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
|
|
|
|
PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
|
|
|
|
PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
|
|
|
|
PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
|
|
|
|
FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-libperl.bin:
|
2013-09-30 13:15:36 +00:00
|
|
|
$(BUILD) $(FLAGS_PERL_EMBED)
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-libpython.bin:
|
2014-07-29 06:57:19 +00:00
|
|
|
$(BUILD)
|
2013-09-30 13:18:37 +00:00
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-libpython-version.bin:
|
2014-07-29 06:57:19 +00:00
|
|
|
$(BUILD)
|
2013-09-30 13:40:04 +00:00
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-libbfd.bin:
|
2014-01-11 19:42:51 +00:00
|
|
|
$(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
|
2013-09-30 13:53:31 +00:00
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-liberty.bin:
|
2013-10-10 06:47:01 +00:00
|
|
|
$(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty
|
2013-10-02 13:15:09 +00:00
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-liberty-z.bin:
|
2013-10-10 06:47:01 +00:00
|
|
|
$(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty -lz
|
2013-10-02 13:15:09 +00:00
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-cplus-demangle.bin:
|
2013-10-02 13:15:09 +00:00
|
|
|
$(BUILD) -liberty
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-backtrace.bin:
|
2013-09-30 14:49:38 +00:00
|
|
|
$(BUILD)
|
|
|
|
|
2013-12-21 05:48:11 +00:00
|
|
|
test-timerfd.bin:
|
2013-10-29 16:43:16 +00:00
|
|
|
$(BUILD)
|
|
|
|
|
2014-02-19 15:52:56 +00:00
|
|
|
test-libdw-dwarf-unwind.bin:
|
|
|
|
$(BUILD)
|
|
|
|
|
2014-07-14 10:02:53 +00:00
|
|
|
test-sync-compare-and-swap.bin:
|
|
|
|
$(BUILD) -Werror
|
|
|
|
|
2014-10-23 21:16:03 +00:00
|
|
|
test-compile-32.bin:
|
|
|
|
$(CC) -m32 -o $(OUTPUT)$@ test-compile.c
|
|
|
|
|
|
|
|
test-compile-x32.bin:
|
|
|
|
$(CC) -mx32 -o $(OUTPUT)$@ test-compile.c
|
|
|
|
|
2013-10-10 07:10:59 +00:00
|
|
|
-include *.d
|
2013-09-30 11:51:28 +00:00
|
|
|
|
2013-09-30 08:08:24 +00:00
|
|
|
###############################
|
|
|
|
|
|
|
|
clean:
|
2013-09-30 11:51:28 +00:00
|
|
|
rm -f $(FILES) *.d
|