# Makefile for the Lomac LKM.
#  
#
# Add -DNO_MEDIATION to CCFLAGS to build a version of LOMAC that logs
# denials, but does not actually deny operations.   (Useful for testing.)
#

CC 	= gcc
LD 	= ld

# Include -DNO_MEDIATION in CCFLAGS to produce a configuration of LOMAC
# that logs violations but never denies operations.
#
# Include -DTRUST in CCFLAGS to produce a configuration of LOMAC that
# allows processes running "trusted" programs to avoid demotion.  The
# default policy is tailored towards configurations that include this
# feature; if you turn it off, you will have to modify the default policy.
#
#
CCFLAGS	= -O3 -Wall -Wstrict-prototypes -Winline -D__KERNEL__ \
	  -fomit-frame-pointer -DMODULE -DPARANOID -DTRUST \
	  -I/usr/src/linux/include 
LDFLAGS	= -r
TARGET	= lomac_mod.o
OBJS	= kernel_lkm.o kernel_wrappers.o kernel_interface.o kernel_driver.o \
	  kernel_util.o kernel_binfmt.o lomac_mediate.o lomac_monitor.o \
	  lomac_plm.o lomac_log.o lomac_tpl.o

.c.o :
	$(CC) $(CCFLAGS) -c $<

$(TARGET) : $(OBJS)
	$(LD) $(LDFLAGS) -o $(TARGET) $(OBJS)

all : $(TARGET)

#
# Make clean rule, for convenience...
#

clean :
	rm *.o


