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