4 test-stackprotector-all \
6 test-volatile-register-var \
13 test-libelf-getphdrnum \
21 test-libpython-version \
28 BUILD = $(CC) -o $(OUTPUT)$@ $@.c
30 ###############################
35 test-stackprotector-all:
36 $(BUILD) -Werror -fstack-protector-all
39 $(BUILD) -Werror -fstack-protector
41 test-volatile-register-var:
42 $(BUILD) -Werror -Wvolatile-register-var
45 $(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
62 test-libelf-getphdrnum:
69 $(BUILD) -lunwind -lunwind-x86_64 -lelf
75 $(BUILD) -I/usr/include/slang -lslang
78 $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
81 $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
83 grep-libs = $(filter -l%,$(1))
84 strip-libs = $(filter-out -l%,$(1))
86 PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
87 PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
88 PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
89 PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
90 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
93 $(BUILD) $(FLAGS_PERL_EMBED)
95 override PYTHON := python
96 override PYTHON_CONFIG := python-config
98 escape-for-shell-sq = $(subst ','\'',$(1))
99 shell-sq = '$(escape-for-shell-sq)'
101 PYTHON_CONFIG_SQ = $(call shell-sq,$(PYTHON_CONFIG))
103 PYTHON_EMBED_LDOPTS = $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
104 PYTHON_EMBED_LDFLAGS = $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
105 PYTHON_EMBED_LIBADD = $(call grep-libs,$(PYTHON_EMBED_LDOPTS))
106 PYTHON_EMBED_CCOPTS = $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
107 FLAGS_PYTHON_EMBED = $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
110 $(BUILD) $(FLAGS_PYTHON_EMBED)
112 test-libpython-version:
113 $(BUILD) $(FLAGS_PYTHON_EMBED)
117 ###############################