On Wed, Jan 24, 2018 at 10:27 AM, Marcus Folkesson <marcus.folkesson@xxxxxxxxx> wrote: > Signed-off-by: Marcus Folkesson <marcus.folkesson@xxxxxxxxx> > --- > python/audit2allow/Makefile | 19 ++++++++++++------- > python/chcat/Makefile | 8 ++++---- > python/semanage/Makefile | 11 +++++------ > python/sepolgen/src/sepolgen/Makefile | 3 ++- > python/sepolicy/Makefile | 18 +++++++++--------- > 5 files changed, 32 insertions(+), 27 deletions(-) > > diff --git a/python/audit2allow/Makefile b/python/audit2allow/Makefile > index 8db8075f..7463ed85 100644 > --- a/python/audit2allow/Makefile > +++ b/python/audit2allow/Makefile > @@ -1,19 +1,24 @@ > PYTHON ?= python > > # Installation directories. > -PREFIX ?= $(DESTDIR)/usr > -BINDIR ?= $(PREFIX)/bin > -LIBDIR ?= $(PREFIX)/lib > -MANDIR ?= $(PREFIX)/share/man > -LOCALEDIR ?= /usr/share/locale > -INCLUDEDIR ?= $(PREFIX)/include > -LIBSEPOLA ?= $(LIBDIR)/libsepol.a > +PREFIX ?= /usr > +BINDIR ?= $(DESTDIR)$(PREFIX)/bin > +LIBDIR ?= $(DESTDIR)$(PREFIX)/lib > +MANDIR ?= $(DESTDIR)$(PREFIX)/share/man > > CFLAGS ?= -Werror -Wall -W > > +# If no specific libsepol.a is specified, fall back on LDFLAGS search path > +# Otherwise, as $(LIBSEPOLA) already appears in the dependencies, there > +# is no need to define a value for LDLIBS_LIBSEPOLA > +ifeq ($(LIBSEPOLA),) > + LDLIBS_LIBSEPOLA := -l:libsepol.a > +endif > + > all: audit2why sepolgen-ifgen-attr-helper > > sepolgen-ifgen-attr-helper: sepolgen-ifgen-attr-helper.o $(LIBSEPOLA) > + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS_LIBSEPOLA) Please remove $(CFLAGS) here, as it is not needed when linking object files. > > ...