#
# Copyright (C) 2000 David A. Hinds -- dahinds@users.sourceforge.net
#
# Makefile 1.119 2001/02/07 00:41:40
#

# Include site dependent options and kernel configuration

# Don't remove "-O2" or bad things will happen!  We use -O2 rather
# than -O3 because it yields smaller code; this is not performance
# critical stuff.

RGSRC=../../../../
include $(RGSRC)/copy_db_envir.mak

LINUX=$(RGSRC)/linux/
EXTRA_CFLAGS+=-D__KERNEL__ -I../include -I$(LINUX)/include

CORE=cs.o cistpl.o rsrc_mgr.o bulkmem.o
M_OBJS=pcmcia_core.o ds.o

ifdef CONFIG_CARDBUS
CORE+=cardbus.o
M_OBJS+=cb_enabler.o
endif

# Which socket drivers do we need?
ifeq ($(ARCH), arm)
M_OBJS+=sa1100.o
else
ifdef CONFIG_8xx
M_OBJS+=m8xx_pcmcia.o
else
ifdef CONFIG_ARMNOMMU
# Add your PCMCIA socket driver for ARM-nommu here
else
M_OBJS+=i82365.o tcic.o
endif
endif
endif

ifdef CONFIG_PCI
CORE+=pci_fixup.o
endif

ifdef CONFIG_PNP_BIOS
CORE+=pnp_bios.o pnp_proc.o pnp_rsrc.o
endif

MI_OBJS=$(CORE)

CD_EXPORTED_BIN_EXTRA+=$(CORE) $(wildcard *.h)
CD_EXPORTED_SRC_EXTRA+=$(CORE) $(CORE:%.o:%.c) $(wildcard *.h)

include $(LINUX)/Rules.make

pcmcia_core.o: $(CORE)
	$(LD) -r -o $@ $(CORE)
