1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
Description: Various Makefile bugfixes and improvements
Fix 1: Allow Debian packaging to override which directory we expect to find
libsepol.a in.
.
Fix 2: Add clean-pywrap/clean-rubywrap targets and pass all these new
targets through to the src/Makefile.
Author: Kyle Moffett <Kyle.D.Moffett@boeing.com>
---
Forwarded: yes
Last-Update: 2016-10-27
--- a/Makefile
+++ b/Makefile
@@ -47,4 +47,10 @@ install-pywrap:
install-rubywrap:
$(MAKE) -C src install-rubywrap $@
+clean-pywrap:
+ $(MAKE) -C src clean-pywrap $@
+
+clean-rubywrap:
+ $(MAKE) -C src clean-rubywrap $@
+
test:
--- a/src/Makefile
+++ b/src/Makefile
@@ -18,6 +18,7 @@ RUBYLIBVER ?= $(shell $(RUBY) -e 'print
RUBYINC ?= $(shell $(PKG_CONFIG) --exists ruby-$(RUBYLIBVER) && $(PKG_CONFIG) --cflags ruby-$(RUBYLIBVER) || $(PKG_CONFIG) --cflags ruby)
RUBYINSTALL ?= $(DESTDIR)$(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]')
LIBBASE ?= $(shell basename $(LIBDIR))
+LIBSEPOLA ?= $(LIBDIR)/libsepol.a
VERSION = $(shell cat ../VERSION)
LIBVERSION = 1
@@ -130,7 +131,7 @@ $(AUDIT2WHYLOBJ): audit2why.c
$(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $<
$(AUDIT2WHYSO): $(AUDIT2WHYLOBJ)
- $(CC) $(CFLAGS) -shared -o $@ $^ -L. $(LDFLAGS) -lselinux $(LIBDIR)/libsepol.a -L$(LIBDIR)
+ $(CC) $(CFLAGS) -shared -o $@ $^ -L. $(LDFLAGS) -lselinux $(LIBSEPOLA) -L$(LIBDIR)
%.o: %.c policy.h
$(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
@@ -171,8 +172,14 @@ install-rubywrap: rubywrap
relabel:
/sbin/restorecon $(SHLIBDIR)/$(LIBSO)
-clean:
- -rm -f $(LIBPC) $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGRUBYLOBJ) $(SWIGSO) $(TARGET) $(AUDIT2WHYSO) *.o *.lo *~
+clean-pywrap:
+ -rm -f $(SWIGLOBJ) $(SWIGSO) $(AUDIT2WHYLOBJ) $(AUDIT2WHYSO)
+
+clean-rubywrap:
+ -rm -f $(SWIGRUBYLOBJ) $(SWIGRUBYSO)
+
+clean: clean-pywrap clean-rubywrap
+ -rm -f $(LIBPC) $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(TARGET) *.o *.lo *~
distclean: clean
rm -f $(GENERATED) $(SWIGFILES)
|