#
# Makefile for XaAES
#

SHELL = /bin/sh
SUBDIRS = 

srcdir = ..
top_srcdir = ..
subdir = $(compile_dir)

default: all

include $(top_srcdir)/CONFIGVARS
include $(top_srcdir)/RULES
include $(top_srcdir)/PHONY

all-here: build

# default overwrites
DEFINITIONS = -D__KERNEL_MODULE__ -DMODULE_NAME=XaAES $(XAAESDEFS)
INCLUDES += -I$(top_srcdir)/../../sys
WARN = 	-Wall \
	-Wmissing-prototypes \
	-Winline \
	-Wshadow \
	-Wpointer-arith \
	-Wcast-qual

LD = $(CC) -nostdlib -Wl,--entry -Wl,_init
LIBS = -lgem16 $(LIBKERN) -lgcc
STRIPFLAGS = 

# default definitions
GENFILES = $(TARGET)
OBJS = $(COBJS:.c=.o) $(SOBJS:.s=.o) $(SSOBJS:.S=.o)

VPATH = ..

#
# main target
#
build: $(TARGET)

$(TARGET): $(OBJS) $(LIBKERNTARGET)
	$(LD) -o $@ $(CFLAGS) $(OBJS) $(LIBS)

$(OBJS): ../XAAESDEFS


# default dependencies
# must be included last
include $(top_srcdir)/DEPENDENCIES
