# Comment/uncomment the following line to disable/enable debugging
#DEBUG = y

#MACRODEFS= -DHWD_DEBUG=3
#MACRODEFS += -D__IRQ_LATENCY__=0
#MACRODEFS += -DEPLIP_16bit_FIFO_SUPPORT
#MACRODEFS += -DFIFO_TEST_SUPPORT
#MACRODEFS += -DPARANOID
#MACRODEFS += -DNET_DEBUG=4
# This Makefile has been simplified as much as possible, by putting all
# generic material, independent of this specific directory, into
# ./Rules.make. Read that file for details

TOPDIR  := $(shell pwd)
include $(TOPDIR)/Rules.make

# Add your debugging flag (or not) to CFLAGS
ifeq ($(DEBUG),y)
  DEBFLAGS = -O -g -DSIMPLE_DEBUG # "-O" is needed to expand inlines
else
  DEBFLAGS = -O2 -fomit-frame-pointer
endif

CFLAGS += $(DEBFLAGS)
CFLAGS += $(MACRODEFS)

MODINSTDIR = $(INSTALLDIR)/net

TARGET = eplip

all:    eplip.o

install:

	install -d $(MODINSTDIR)
	install -c $(TARGET).o $(MODINSTDIR)

clean:
	rm -f *.o *~ core

$(TARGET).o:
ifdef KCONFIG_ERROR
		$(error $(KCONFIG_ERROR) )
endif
	$(CC) $(CFLAGS) -pipe -c ecp.c
	$(CC) $(CFLAGS) -pipe -c eplip-drv.c
	$(LD) -r -o $@ ecp.o eplip-drv.o
#	$(LD) -r -o $(TARGET).o ecp.o eplip-drv.o
