#
# Makefile for mouse
#

SHELL = /bin/sh
SUBDIRS =

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

default: all

include ../MOUSEDEFS

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


all-here: build

# default overwrites
DEFINITIONS = -D__KERNEL_MODULE__ -DMODULE_NAME=mouse $(USBDEFS)

INCLUDES += -I$(top_srcdir)/../../sys
WARN = 	-Wall \
	-Wmissing-prototypes \
	-Wshadow \
	-Wpointer-arith \
	-Wcast-qual


LIBS = $(LIBKERN) -lgcc
STRIPFLAGS =

# default definitions
GENFILES = $(TARGET)
OBJS = $(COBJS:.c=.o) $(SOBJS:.s=.o) $(SSOBJS:.S=.o)
ifeq ($(TARGET),mouse.prg)
OBJS += $(TOSCOBJS:.c=.o) $(TOSSSOBJS:.S=.o)
endif

VPATH = ..

#
# main target
#
build: $(TARGET)

$(TARGET): $(OBJS) $(LIBKERNTARGET)
	$(CC) $(LDEXTRA) -o $@ $(CFLAGS) $(OBJS) $(LIBS)
	
$(OBJS): ../MOUSEDEFS


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