###########################################################################
#
# Makefile for the Linux 2.2 Kernel Interface for the Lomac LKM.
#  
###########################################################################

###########################################################################
# User-configurable variables
###########################################################################

# some useful programs, should be OK as is.
#
CC 	= gcc
LD 	= ld
RM	= rm -f

include ../../arch.mk

CCFLAGS	= -O3 -Wall -Wstrict-prototypes -Winline -D__KERNEL__ \
	  -fomit-frame-pointer -DMODULE -DPARANOID \
	  -I- -I../../Core -I. -I$(KERNELHEADERS)

# linker flags, should be OK as is.
#
LDFLAGS	= -r


###########################################################################
# Rules that shouldn't need user-configuration.
###########################################################################

TARGET	= arch.o
OBJS	= kernel_lkm.o kernel_wrappers.o kernel_interface.o kernel_driver.o \
	  kernel_util.o kernel_binfmt.o 

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

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

# this rule copies $(TARGET) to the parent directory where a higher-level
# Makefile can use it as part of the complete LOMAC LKM.
all : $(TARGET)

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

clean :
	$(RM) *.o


