selinux/mcstrans/utils/Makefile
Stephen Smalley 4cc808671a Move policycoreutils/mcstrans to mcstrans.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2016-11-16 11:19:50 -05:00

42 lines
814 B
Makefile

# Installation directories.
PREFIX ?= $(DESTDIR)/usr
BINDIR ?= $(PREFIX)/sbin
ARCH = $(shell uname -i)
ifeq "$(ARCH)" "x86_64"
# In case of 64 bit system, use these lines
LIBDIR=/usr/lib64
else
ifeq "$(ARCH)" "i686"
# In case of 32 bit system, use these lines
LIBDIR=/usr/lib
else
ifeq "$(ARCH)" "i386"
# In case of 32 bit system, use these lines
LIBDIR=/usr/lib
endif
endif
endif
CFLAGS ?= -Wall
override CFLAGS += -I../src -D_GNU_SOURCE
LDLIBS += -L../src ../src/mcstrans.o ../src/mls_level.o -lselinux -lpcre $(LIBDIR)/libsepol.a
TARGETS=$(patsubst %.c,%,$(wildcard *.c))
all: $(TARGETS)
install: all
-mkdir -p $(BINDIR)
install -m 755 $(TARGETS) $(BINDIR)
test:
./mlstrans-test-runner.py ../test/*.test
clean:
rm -f $(TARGETS) *.o *~ \#*
relabel: