############################################################################
# arch/z80/src/z180/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.  The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

ifeq ($(CONFIG_ARCH_HAVEHEAD),)
ifeq ($(CONFIG_LINKER_ROM_AT_0000),y)
HEAD_ASRC = z180_rom.asm
else
HEAD_ASRC = z180_head.asm
endif
endif

CMN_CSRCS  = z80_allocateheap.c z80_createstack.c z80_doirq.c
CMN_CSRCS += z80_exit.c z80_interruptcontext.c z80_idle.c
CMN_CSRCS += z80_initialize.c z80_mdelay.c z80_nputs.c
CMN_CSRCS += z80_releasestack.c z80_stackframe.c z80_switchcontext.c
CMN_CSRCS += z80_udelay.c z80_usestack.c

CHIP_ASRCS  = z180_restoreusercontext.asm z180_saveusercontext.asm
CHIP_ASRCS += z180_vectcommon.asm

ifeq ($(CONFIG_LINKER_ROM_AT_0000),y)
CHIP_ASRCS += z180_romvectors.asm
else
CHIP_ASRCS += z180_vectors.asm
endif

CHIP_CSRCS  = z180_copystate.c z180_initialstate.c z180_io.c z180_irq.c
CHIP_CSRCS += z180_lowscc.c z180_lowserial.c z180_modifiyreg8.c z180_mmu.c
CHIP_CSRCS += z180_registerdump.c

ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CHIP_CSRCS += z180_schedulesigaction.c z180_sigdeliver.c
endif

ifneq ($(CONFIG_SCHED_TICKLESS),y)
CHIP_CSRCS += z180_timerisr.c
endif