2013-09-30 08:08:24 +00:00
|
|
|
|
2013-09-30 11:37:10 +00:00
|
|
|
FILES= \
|
|
|
|
test-hello \
|
2013-09-30 11:48:44 +00:00
|
|
|
test-stackprotector-all \
|
2013-10-07 07:47:00 +00:00
|
|
|
test-stackprotector \
|
2013-09-30 11:58:12 +00:00
|
|
|
test-volatile-register-var \
|
2013-10-07 07:38:28 +00:00
|
|
|
test-fortify-source \
|
2013-09-30 12:11:46 +00:00
|
|
|
test-bionic \
|
2013-09-30 12:20:25 +00:00
|
|
|
test-libelf \
|
2013-10-07 08:34:20 +00:00
|
|
|
test-glibc \
|
2013-10-07 08:35:39 +00:00
|
|
|
test-dwarf \
|
2013-09-30 13:02:28 +00:00
|
|
|
test-libelf-mmap \
|
2013-09-30 12:35:27 +00:00
|
|
|
test-libelf-getphdrnum \
|
2013-09-30 12:45:44 +00:00
|
|
|
test-libunwind \
|
2013-09-30 12:55:31 +00:00
|
|
|
test-libaudit \
|
2013-09-30 12:57:54 +00:00
|
|
|
test-libslang \
|
2013-09-30 13:01:56 +00:00
|
|
|
test-gtk2 \
|
2013-09-30 13:08:30 +00:00
|
|
|
test-gtk2-infobar \
|
2013-09-30 13:15:36 +00:00
|
|
|
test-libperl \
|
2013-09-30 11:37:10 +00:00
|
|
|
test-libnuma
|
2013-09-30 08:08:24 +00:00
|
|
|
|
2013-09-30 11:51:28 +00:00
|
|
|
CC := $(CC) -MD
|
|
|
|
|
2013-09-30 08:08:24 +00:00
|
|
|
all: $(FILES)
|
|
|
|
|
|
|
|
BUILD = $(CC) -o $(OUTPUT)$@ $@.c
|
|
|
|
|
|
|
|
###############################
|
|
|
|
|
2013-09-30 11:51:28 +00:00
|
|
|
test-hello:
|
2013-09-30 08:08:24 +00:00
|
|
|
$(BUILD)
|
|
|
|
|
2013-09-30 11:48:44 +00:00
|
|
|
test-stackprotector-all:
|
|
|
|
$(BUILD) -Werror -fstack-protector-all
|
|
|
|
|
2013-10-07 07:47:00 +00:00
|
|
|
test-stackprotector:
|
|
|
|
$(BUILD) -Werror -fstack-protector
|
|
|
|
|
2013-09-30 11:58:12 +00:00
|
|
|
test-volatile-register-var:
|
|
|
|
$(BUILD) -Werror -Wvolatile-register-var
|
|
|
|
|
2013-10-07 07:38:28 +00:00
|
|
|
test-fortify-source:
|
|
|
|
$(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
|
|
|
|
|
2013-09-30 12:11:46 +00:00
|
|
|
test-bionic:
|
|
|
|
$(BUILD)
|
|
|
|
|
2013-09-30 12:20:25 +00:00
|
|
|
test-libelf:
|
|
|
|
$(BUILD) -lelf
|
|
|
|
|
2013-10-07 08:34:20 +00:00
|
|
|
test-glibc:
|
|
|
|
$(BUILD)
|
|
|
|
|
2013-10-07 08:35:39 +00:00
|
|
|
test-dwarf:
|
|
|
|
$(BUILD) -ldw
|
|
|
|
|
2013-09-30 13:02:28 +00:00
|
|
|
test-libelf-mmap:
|
|
|
|
$(BUILD) -lelf
|
|
|
|
|
2013-09-30 12:35:27 +00:00
|
|
|
test-libelf-getphdrnum:
|
|
|
|
$(BUILD) -lelf
|
|
|
|
|
2013-09-30 11:37:10 +00:00
|
|
|
test-libnuma:
|
|
|
|
$(BUILD) -lnuma
|
|
|
|
|
2013-09-30 12:45:44 +00:00
|
|
|
test-libunwind:
|
|
|
|
$(BUILD) -lunwind -lunwind-x86_64 -lelf
|
|
|
|
|
2013-09-30 12:55:31 +00:00
|
|
|
test-libaudit:
|
|
|
|
$(BUILD) -laudit
|
|
|
|
|
2013-09-30 12:57:54 +00:00
|
|
|
test-libslang:
|
|
|
|
$(BUILD) -I/usr/include/slang -lslang
|
|
|
|
|
2013-09-30 13:01:56 +00:00
|
|
|
test-gtk2:
|
|
|
|
$(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
|
|
|
|
|
2013-09-30 13:08:30 +00:00
|
|
|
test-gtk2-infobar:
|
|
|
|
$(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
test-libperl:
|
|
|
|
$(BUILD) $(FLAGS_PERL_EMBED)
|
|
|
|
|
2013-09-30 11:51:28 +00:00
|
|
|
-include *.d */*.d
|
|
|
|
|
2013-09-30 08:08:24 +00:00
|
|
|
###############################
|
|
|
|
|
|
|
|
clean:
|
2013-09-30 11:51:28 +00:00
|
|
|
rm -f $(FILES) *.d
|