ifeq ($(VDIFF_PROJECT),)
VDIFF_PROJECT=True

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

VDIFF_BASE_DIR := $(BASE_DIR)

BASE_DIR=$(VDIFF_BASE_DIR)/../gtkada
include $(BASE_DIR)/Makefile.gtkada
BASE_DIR=$(VDIFF_BASE_DIR)/../common
include $(BASE_DIR)/Makefile.common
BASE_DIR=$(VDIFF_BASE_DIR)/../kernel
include $(BASE_DIR)/Makefile.kernel

VDIFF_SRC_DIRS = $(VDIFF_BASE_DIR)/src
SRC_DIRS += $(VDIFF_SRC_DIRS)
C_SRCS = \
  $(foreach name,$(VDIFF_SRC_DIRS),$(notdir $(wildcard $(name)/*$(C_EXT))))
VDIFF_SRCS := \
  $(foreach name,$(VDIFF_SRC_DIRS),$(notdir $(wildcard $(name)/*$(C_EXT))))
VDIFF_OBJ_DIR = $(VDIFF_BASE_DIR)/obj
OBJ_DIR = $(VDIFF_OBJ_DIR)

CFLAGS = -g -O2
ADA_SOURCES = tdiff.adb vdiff.adb

PROJECT_FILE = vdiff

ifneq ($(strip $(VDIFF_SRCS)),)
   LIBS := $(VDIFF_OBJ_DIR)/libvdiff$(AR_EXT) $(LIBS)
endif

ifeq ($(VDIFF_ROOT),True)
   include ../builder/src/Makefile.generic
else
   DEPS_PROJECTS += $(VDIFF_BASE_DIR)/vdiff
endif

endif
