Home | History | Annotate | Download | only in utils
      1 # Installation directories.
      2 PREFIX ?= $(DESTDIR)/usr
      3 BINDIR ?= $(PREFIX)/sbin
      4 
      5 ARCH = $(shell uname -i)
      6 ifeq "$(ARCH)" "x86_64"
      7         # In case of 64 bit system, use these lines
      8         LIBDIR=/usr/lib64
      9 else
     10 ifeq "$(ARCH)" "i686"
     11         # In case of 32 bit system, use these lines
     12         LIBDIR=/usr/lib
     13 else
     14 ifeq "$(ARCH)" "i386"
     15         # In case of 32 bit system, use these lines
     16         LIBDIR=/usr/lib
     17 endif
     18 endif
     19 endif
     20 
     21 
     22 CFLAGS ?= -Wall
     23 override CFLAGS += -I../src -D_GNU_SOURCE
     24 LDLIBS += -L../src ../src/mcstrans.o ../src/mls_level.o -lselinux -lpcre $(LIBDIR)/libsepol.a
     25 
     26 TARGETS=$(patsubst %.c,%,$(wildcard *.c))
     27 
     28 all: $(TARGETS) 
     29 
     30 install: all
     31 	-mkdir -p $(BINDIR)
     32 	install -m 755 $(TARGETS) $(BINDIR)
     33 
     34 test:
     35 	./mlstrans-test-runner.py ../test/*.test
     36 
     37 clean:
     38 	rm -f $(TARGETS) *.o *~ \#*
     39 
     40 relabel:
     41 
     42