# translate the version string, so it can be used on DJGPP, where only
# one dot in filename is allowed

# to avoid recursion when redefining $(version)
_version:=$(version)
__version=$(word 1,$(subst ., ,$(_version))).
version=$(__version)$(subst .,,$(subst $(__version),,$(_version)))

SYSTEM_HEADER_DIR=$(DJDIR)/include
X_CPPFLAGS=-DSTANDARD_INCLUDE_DIR=\"\$$DJDIR/include\" \
	   -DSTANDARD_INCLUDE_COMPONENT=\"\"
FIXINCLUDES=fixinc.djgpp

# when building a native compiler for DJGPP, make the target_alias
# a shorter name, since otherwise it will produce some problems, when
# using the same gcc once with long filenames and once with short (8+3)
# filenames
ifeq ($(findstring -pc-msdosdjgpp,$(target_alias)),-pc-msdosdjgpp)
target_alias=djgpp
endif

# on DJGPP the 'ln -s' does not work correctly
LN = cp -p

EXTRA_PARTS = crtf.o djgpp.djl

INSTALL_TARGET += install_extra_djgpp_files

EXTRA_GCC_OBJS += djgcc-mktemp.o
