#
# Makefile for building the dispol program
#
PREFIX=/usr/local/selinux/
BINDIR=$(PREFIX)/bin

CFLAGS = -g -Wall -O2 -pipe
#CFLAGS = -g -Wall -O2 -pipe
override CFLAGS += -include global.h -I. -I.. -I../include

# Set to y if MLS is enabled in the module.
MLS=n

ifeq ($(MLS),y)
OPTIONS = -DCONFIG_SECURITY_SELINUX_MLS
else
OPTIONS = 
endif

OBJS = ebitmap.o queue.o hashtab.o symtab.o sidtab.o avtab.o policydb.o services.o conditional.o dispol.o 

ifeq ($(MLS),y)
OBJS += mls.o
endif

LIBS=-lfl

all: dispol

dispol: $(OBJS)
	$(CC) -o $@ $^ $(LIBS)

%.o: ../%.c 
	$(CC) $(CFLAGS) -o $@ -c $<

clean:
	rm -f dispol *.o 

