# Alpha Mach makefile fragment
# Copyright 2002 Free Software Foundation, Inc.
#
# Permission to use, copy, modify and distribute this software and its
# documentation is hereby granted, provided that both the copyright
# notice and this permission notice appear in all copies of the
# software, derivative works or modified versions, and any portions
# thereof, and that both notices appear in supporting documentation.
#
# THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS
# "AS IS" CONDITION.  THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY
# LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
# USE OF THIS SOFTWARE.


# Some of the alpha-specific code checks for these.
DEFINES += -Dalpha=1

# Source files for any alpha kernel
dec-files = ln_copy.c
alpha-files = alpha_init.c alpha_instruction.c alpha_mem_ops.c \
	     alpha_scb.c alpha_startup.c ast_check.c pcb.c pmap.c \
	     trap.c

# Assembler source
dec-Sfiles =
alpha-Sfiles = alpha_cache.S alpha_copyin.S alpha_cpu.S alpha_lock.S \
	     context.S locore.S prom_interface.S supage.S

objfiles += $(addsuffix .o,$(basename $(dec-files) $(dec-Sfiles) \
				      $(alpha-files) $(alpha-Sfiles)))
vpath %.c $(sysdep)/dec $(sysdep)/alpha
vpath %.S $(sysdep)/dec $(sysdep)/alpha



# Where to find some things
vpath alphaasm.sym $(sysdep)/alpha

$(patsubst %.S,%.o,$(dec-Sfiles) $(alpha-Sfiles)): alphaasm.h

# Our include files are here; make sure they PRECEDE the generic ones.
INCLUDES := -I$(sysdep)/dec -I$(sysdep)/alpha \
	-I$(sysdep)/include -I$(sysdep) \
	$(INCLUDES)

# arrange suitable load address
KERN_LDFLAGS += -Ttext 0xfffffc0001000000

# Assemble .S files correctly
ASFLAGS += -DASSEMBLER


# Header files we install

alpha-installed-headers := $(addprefix mach/alpha/,\
		            alpha_instruction.h asm.h boolean.h exception.h \
			    kern_return.h machine_types.defs \
			    syscall_sw.h thread_status.h \
			    vm_param.h vm_types.h)
