ifeq ($(SHELL_PROJECT),)
SHELL_PROJECT=True

ifeq ($(BASE_DIR),)
   include ../Makefile.common
   BASE_DIR=$(shell pwd)
   SHELL_ROOT=True
endif

SHELL_BASE_DIR := $(BASE_DIR)

BASE_DIR=$(SHELL_BASE_DIR)/../kernel
include $(BASE_DIR)/Makefile.kernel

SHELL_SRC_DIRS = $(SHELL_BASE_DIR)/src 
SRC_DIRS += $(SHELL_SRC_DIRS)
C_SRCS = \
  $(foreach name,$(SHELL_SRC_DIRS),$(notdir $(wildcard $(name)/*$(C_EXT))))
SHELL_OBJ_DIR = $(SHELL_BASE_DIR)/obj
OBJ_DIR = $(SHELL_OBJ_DIR)

CFLAGS = -g -O2

PROJECT_FILE = shell

ifneq ($(strip $(SHELL_SRCS)),)
   LIBS := $(SHELL_OBJ_DIR)/libshell$(AR_EXT) $(LIBS)
endif

ifeq ($(SHELL_ROOT),True)
   include ../builder/src/Makefile.generic
else
   DEPS_PROJECTS += $(SHELL_BASE_DIR)/shell
endif

endif
