ifeq ($(SRC_EDITOR_PROJECT),)
SRC_EDITOR_PROJECT=True

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

SRC_EDITOR_BASE_DIR := $(BASE_DIR)

BASE_DIR=$(SRC_EDITOR_BASE_DIR)/../common
include $(BASE_DIR)/Makefile.common
BASE_DIR=$(SRC_EDITOR_BASE_DIR)/../gtkada
include $(BASE_DIR)/Makefile.gtkada
BASE_DIR=$(SRC_EDITOR_BASE_DIR)/../kernel
include $(BASE_DIR)/Makefile.kernel
BASE_DIR=$(SRC_EDITOR_BASE_DIR)/../gvd
include $(BASE_DIR)/Makefile.gvd_common
BASE_DIR=$(SRC_EDITOR_BASE_DIR)/../vsearch
include $(BASE_DIR)/Makefile.vsearch
BASE_DIR=$(SRC_EDITOR_BASE_DIR)/../aliases
include $(BASE_DIR)/Makefile.aliases

SRC_EDITOR_SRC_DIRS = $(SRC_EDITOR_BASE_DIR)/src
SRC_DIRS += $(SRC_EDITOR_SRC_DIRS)
C_SRCS = \
  $(foreach name,$(SRC_EDITOR_SRC_DIRS),$(notdir $(wildcard $(name)/*$(C_EXT))))
SRC_EDITOR_SRCS := \
  $(foreach name,$(SRC_EDITOR_SRC_DIRS),$(notdir $(wildcard $(name)/*$(C_EXT))))
SRC_EDITOR_OBJ_DIR = $(SRC_EDITOR_BASE_DIR)/obj
OBJ_DIR = $(SRC_EDITOR_OBJ_DIR)

CFLAGS = -g -O2
ADA_SOURCES = src.adb

PROJECT_FILE = src_editor

ifneq ($(strip $(SRC_EDITOR_SRCS)),)
   LIBS := $(SRC_EDITOR_OBJ_DIR)/libsrc_editor$(AR_EXT) $(LIBS)
endif

ifeq ($(SRC_EDITOR_ROOT),True)
   include ../builder/src/Makefile.generic
else
   DEPS_PROJECTS += $(SRC_EDITOR_BASE_DIR)/src_editor
endif

endif
