From c81a3f32cc0877784fb287beb5e862c74e5435eb Mon Sep 17 00:00:00 2001 From: James Morris Date: Wed, 24 May 2006 16:11:58 +0000 Subject: secmark: Add libselinux support This patch adds the infrastructure for linking iptables against libselinux, for use with the SECMARK target. This is enabled by setting DO_SELINUX=1 in the build environment. Signed-off-by: James Morris --- Rules.make | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Rules.make') diff --git a/Rules.make b/Rules.make index 6332c8d9..ffc8996b 100644 --- a/Rules.make +++ b/Rules.make @@ -1,12 +1,12 @@ #! /usr/bin/make -all: $(SHARED_LIBS) $(EXTRAS) +all: $(SHARED_LIBS) $(SHARED_SE_LIBS) $(EXTRAS) experimental: $(EXTRAS_EXP) # Have to handle extensions which no longer exist. clean: $(EXTRA_CLEANS) - rm -f $(SHARED_LIBS) $(EXTRAS) $(EXTRAS_EXP) $(SHARED_LIBS:%.so=%_sh.o) + rm -f $(SHARED_LIBS) $(SHARED_SE_LIBS) $(EXTRAS) $(EXTRAS_EXP) $(SHARED_LIBS:%.so=%_sh.o) $(SHARED_SE_LIBS:%.so=%_sh.o) rm -f extensions/initext.c extensions/initext6.c @find . -name '*.[ao]' -o -name '*.so' | xargs rm -f @@ -33,6 +33,13 @@ $(SHARED_LIBS:%.so=%.d): %.d: %.c $(SHARED_LIBS): %.so : %_sh.o $(LD) -shared $(EXT_LDFLAGS) -o $@ $< +$(SHARED_SE_LIBS:%.so=%.d): %.d: %.c + @-$(CC) -M -MG $(CFLAGS) $< | \ + sed -e 's@^.*\.o:@$*.d $*_sh.o:@' > $@ + +$(SHARED_SE_LIBS): %.so : %_sh.o + $(LD) -shared $(EXT_LDFLAGS) -o $@ $< $(LDLIBS) + %_sh.o : %.c $(CC) $(SH_CFLAGS) -o $@ -c $< -- cgit v1.2.3