# Makefile.conf.in for DOSEMU
#
# This file is included by all Makefiles

OS = @CONFIG_HOST@
DOSBIN = dosemu2.bin
SOVERSION = 0.1
ifeq ($(OS),Darwin)
DOSLIB = libdosemu2.$(SOVERSION).dylib
else
DOSLIB = libdosemu2.so.$(SOVERSION)
endif
SOLIB := @SOLIB@

PACKAGE_TARNAME:=@PACKAGE_TARNAME@
prefix:=@prefix@
exec_prefix=@exec_prefix@
bindir:=@bindir@
sysconfdir:=@sysconfdir@
confdir:=@confdir@
libdir:=@libdir@
libexecdir:=@libexecdir@
includedir:=@includedir@
plugindir:=@plugindir@
datarootdir:=@datarootdir@
datadir:=@datadir@
mandir:=@mandir@
docdir:=@docdir@
x11fontdir:=@x11fontdir@
ttffontdir:=@ttffontdir@
fdtarball:=@fdtarball@
username := @username@
cmdsuff:=@cmdsuff@
abs_top_srcdir:=@abs_top_srcdir@
abs_top_builddir:=$(realpath @abs_top_builddir@)

INCDIR=-iquote ${top_builddir}/src/include -iquote ${top_builddir}/src/plugin \
    -iquote ${top_srcdir}/src/base/bios/x86 -iquote ${top_srcdir}/src/include \
    -iquote ${top_srcdir}/src/base/lib -iquote ${top_builddir}
top_srcdir:=$(abs_top_srcdir)

CFLAGS:=@CFLAGS@
ALL_CFLAGS:=@DOSEMU_CFLAGS@ $(CFLAGS)
ASFLAGS:=@ASFLAGS@
XASFLAGS:=@XASFLAGS@
CPPFLAGS:=@CPPFLAGS@
ALL_CPPFLAGS:=@DOSEMU_CPPFLAGS@ $(INCDIR) $(CPPFLAGS)
LDFLAGS:=@LDFLAGS@
AS_LDFLAGS:=@AS_LDFLAGS@
ALL_LDFLAGS:=@DOSEMU_LDFLAGS@ $(LDFLAGS)
DOSBIN_LDFLAGS:=@DOSBIN_LDFLAGS@
PLUGIN_LDFLAGS:=@PLUGIN_LDFLAGS@
SO_LDFLAGS:=@SO_LDFLAGS@
LIBS:=@LIBS@
CC:=@CC@
CPP:=@CPP@
LD:=@CC@
AS:=@AS@
XAS:=@XAS@
AS_LD:=@AS_LD@
XOBJCOPY:=@XOBJCOPY@
CC_FOR_BUILD:=@CC_FOR_BUILD@
CFLAGS_FOR_BUILD:=@CFLAGS_FOR_BUILD@

YACC:=@YACC@
# NOTE: we really need bison, yacc won't work any more
#YACC=bison -y
LEX:=@LEX@
LN_S := @LN_S@
LN_SFT := @LN_SFT@

# This gets defined even if we chose via ./include/config.h NOT to
# use the debugger
DEBUGGER:=@DEBUGGER@

OPTIONALSUBDIRS := @OPTIONALSUBDIRS@
PLUGINSUBDIRS := @PLUGINSUBDIRS@
ST_PLUGINSUBDIRS := @ST_PLUGINSUBDIRS@
CONFFILES := @CONFFILES@

HAVE_LIBBFD := @HAVE_LIBBFD@
NEED_LIBBSD := @NEED_LIBBSD@

RANLIB:=@RANLIB@

PACKAGE_NAME:=@PACKAGE_TARNAME@

USE_DL_PLUGINS := @USE_DL_PLUGINS@
X86_EMULATOR := @X86_EMULATOR@
X86_JIT := @X86_JIT@
KVM := @KVM@
MCONTEXT := @MCONTEXT@
USE_OFD_LOCKS := @USE_OFD_LOCKS@
USE_XATTRS := @USE_XATTRS@
USE_EVTIMER_FD := @USE_EVTIMER_FD@
USE_OSS := @USE_OSS@
USE_SOFTFLOAT := @USE_SOFTFLOAT@
USE_X := @USE_X@
USE_LANDLOCK := @USE_LANDLOCK@

INSTALL:=@INSTALL@
REALTOPDIR:=$(top_srcdir)
SRCPATH:=$(top_srcdir)/src

PACKAGE_VERSION:=$(shell cd $(top_srcdir) && ./getversion)
PACKAGE_VERSION_SPACES:=$(subst ., ,$(PACKAGE_VERSION))
PACKAGE_VERSION_SPACES:=$(subst -, ,$(PACKAGE_VERSION_SPACES))
PACKAGE_VERSION_SPACES:=$(subst pre, pre,$(PACKAGE_VERSION_SPACES))
VERSION:=$(word 1, $(PACKAGE_VERSION_SPACES))
SUBLEVEL:=$(word 2, $(PACKAGE_VERSION_SPACES))
PATCHLEVEL1:=$(word 3, $(PACKAGE_VERSION_SPACES))
PATCHLEVEL2:=$(word 4, $(PACKAGE_VERSION_SPACES))
ifeq ($(PATCHLEVEL2),)
PACKETNAME:=$(PACKAGE_NAME)-$(VERSION).$(SUBLEVEL)$(PATCHLEVEL1)
else
PACKETNAME:=$(PACKAGE_NAME)-$(VERSION).$(SUBLEVEL)$(PATCHLEVEL1).$(PATCHLEVEL2)
endif
THISVERSION:=$(VERSION).$(SUBLEVEL)-$(PATCHLEVEL1)
PACKVERSION:=$(VERSION).$(SUBLEVEL)$(PATCHLEVEL1)
BINPATH:=$(top_builddir)/$(THISVERSION)
RELEASE_DATE="@RELEASE_DATE@"
REVISION:=$(shell cd $(top_srcdir) && ./getversion -r)

ifeq ($(USE_DL_PLUGINS),1)
DL_CFLAGS:=-fPIC
else
-include $(top_builddir)/src/plugin/*/Makefile.conf
endif
