# Makefile - makefile for target/src/scopetools
#
# modification history
# --------------------
# 01a,26mar06,c_c   created.
#
# DESCRIPTION
# This file contains the makefile rules for building the scopetools libraries
#
#*/

TGT_DIR=$(WIND_BASE)/target
TOOLS_SRC_ROOT = ../../..

LIB_BASE_NAME   = param

EXTRA_DEFINE	+=	-DPtrIntType=long
EXTRA_INCLUDE	=	-I$(TOOLS_SRC_ROOT)/rtilib/include/share \
		-I$(TOOLS_SRC_ROOT)/scopeutils/include/vx -I..
DOC_FILES=	

# We need to filter out any small data enabling switches, since the DKM loader
# doesn't support them yet.  This is normally done in common_rules.mk, but
# since we need to include defs.library earlier, we also need to define this
# earlier.
SDA_DISABLE = true

# defs.library to pull in automatic definition of the VX_CPU_FAMILY, based on
# the value of CPU.
include $(TGT_DIR)/h/make/defs.library

ifeq ($(VX_CPU_FAMILY),)
$(error VX_CPU_FAMILY undefined!)
endif

ifeq ($(VX_CPU_FAMILY),cf)
ST_ARCH = mcf
endif

ifeq ($(VX_CPU_FAMILY),pentium)
ST_ARCH = i86
endif

ifeq ($(VX_CPU_FAMILY),simlinux)
$(warning param hasn\'t been ported to support $(VX_CPU_FAMILY) yet.)
ST_ARCH = i86
endif

ifeq ($(VX_CPU_FAMILY),simpc)
$(warning param hasn\'t been ported to support $(VX_CPU_FAMILY) yet.)
ST_ARCH = i86
endif


ifeq ($(ST_ARCH),)
ST_ARCH = $(VX_CPU_FAMILY)
endif

INDIRECT_SOURCES = param_$(ST_ARCH).c
OBJS=	param_$(ST_ARCH).o

HEADERS = param_i86.c param_ppc.c param_mips.c param_mcf.c param_arm.c \
		param_sh.c

include $(TOOLS_SRC_ROOT)/make/common_rules.mk

ifneq (x86-win32,$(WIND_HOST_TYPE))
param_% :
	ln -s $* $@
else
param_% :
	cp $* $@
endif

# end of scopeutils/param/arch
