ifeq ($(SYNTAX_PROJECT),)
SYNTAX_PROJECT=True

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

SYNTAX_BASE_DIR := $(BASE_DIR)

BASE_DIR=$(SYNTAX_BASE_DIR)/../gvd
include $(BASE_DIR)/Makefile.gvd_common

SYNTAX_SRC_DIRS = $(SYNTAX_BASE_DIR)/src
SRC_DIRS += $(SYNTAX_SRC_DIRS)
C_SRCS = \
  $(foreach name,$(SYNTAX_SRC_DIRS),$(notdir $(wildcard $(name)/*$(C_EXT))))
AUNIT_SRCS := \
  $(foreach name,$(SYNTAX_SRC_DIRS),$(notdir $(wildcard $(name)/*$(C_EXT))))
SYNTAX_OBJ_DIR = $(SYNTAX_BASE_DIR)/obj
OBJ_DIR = $(SYNTAX_OBJ_DIR)

CFLAGS = -g -O2
ADA_SOURCES = gnatparse.adb gnatpp.adb gnatunit.adb

PROJECT_FILE = syntax

ifneq ($(strip $(SYNTAX_SRCS)),)
   LIBS := $(SYNTAX_OBJ_DIR)/libsyntax$(AR_EXT) $(LIBS)
endif

ifeq ($(SYNTAX_ROOT),True)
   include ../builder/src/Makefile.generic
else
   DEPS_PROJECTS += $(SYNTAX_BASE_DIR)/syntax
endif

endif
