CC=gcc

# which interface do you want to use
# now you can select both without problems
INTERFACE+= -D PD_INTERFACE
INTERFACE+= -D IDC_INTERFACE

# last possible way to make system work when you have problems
# with single step or stop
# it tries to find 17 bit protocol boundary
# after single step or stop
# BDM_DEFS += -D BDM_TRY_RESYNCHRO

# if the kernel is configured for autoloading via kerneld, uncomment this line
AUTOLOADING=-DMODVERSIONS

CFLAGS= -Wall -O2 -I. -m486 -D__KERNEL__ -DKERNEL $(INTERFACE) \
        -DMODULE  $(AUTOLOADING) $(BDM_DEFS)

#CFLAGS+= -D__SMP__

all:	bdm.o
	cp $^ /lib/modules/`uname -r`/misc
	rmmod  bdm
	insmod bdm


bdm.o:	bdm.c bdm.h k_compat.h

.SUFFIXES: .i .s
.c.i:
	$(CC) -E $(CFLAGS) $< >$@

.c.s:
	$(CC) -S $(CFLAGS) $<


