#----------------------------------------------------------------------
# 		 Makefile to build Core Features for IPMI stack
# 		   Copyright (c) 2006 American Megatrends Inc 
#-----------------------------------------------------------------------

#$$ SUBDIRS = STACKLib  
SUBDIRDS =

ifeq ($(USE_SOFTPROC),1)
SUBDIRS +=SoftProc
endif

# These depend upon SoftProc if SOFTPROC is enabled
#$$ SUBDIRS += PDK HAL BMC Timer 

ifeq ($(SUPPORT_CHASSIS_AS_TASK),0)
SUBDIRS += Chassis 
endif


ifeq ($(SUPPORT_KCS1_IFC),1)
SUBDIRS += KCS
endif

ifeq ($(SUPPORT_SERIAL_IFC),1)
SUBDIRS += Serial
endif

ifeq ($(SUPPORT_LAN_IFC),1)
SUBDIRS += LAN
endif

ifeq ($(SUPPORT_IPMB_IFC),1)
SUBDIRS += IPMB
endif

ifeq ($(SUPPORT_SOL_IFC),1)
SUBDIRS += SOL
endif

ifeq ($(SUPPORT_USB_IFC),1)
SUBDIRS += USB
endif

#$$ SUBDIRS += IPMIMain

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

#---------------------- Compute TOPDIR and include Rules file --------------------
ifndef TOPDIR
TOPDIR  := $(shell cd ../../../../..; pwd)
endif
include $(TOPDIR)/development/rules/Rules.make.IPMI
#---------------------- Change according to your files ----------------------------


#--------------WARNING : Donot Modify anything below this line ---------------------
all: subdirs # If your module exports symbols

subdirs:
	@for n in $(SUBDIRS); do $(MAKE) -C $$n all|| exit 1; done

install:
	@for n in $(SUBDIRS); do $(MAKE) -C $$n install || exit 1; done

clean:
	rm -f *~ .depend
	@for n in $(SUBDIRS); do $(MAKE) -C $$n clean || exit 1; done

lint:
	@for n in $(SUBDIRS); do $(MAKE) -C $$n lint; done


ifeq (.depend,$(wildcard .depend))
include .depend
endif
#----------------------------------------------------------------------------------------
