# -*- Mode: makefile -*-

# Common configuration for sparc/solaris builds.

CPP_DEFINE_OPTIONS := -DSOLARIS -DSVR4
# Enable support for :linkage-table feature.

ifdef FEATURE_LINKAGE_TABLE
CPP_DEFINE_OPTIONS += -DLINKAGE_TABLE
endif

# Enable support for generational GC
ifdef FEATURE_GENCGC
CPP_DEFINE_OPTIONS += -DGENCGC
GC_SRC = gencgc.c
else
GC_SRC = gc.c
endif

# Enable support for SSE2.  If FEATURE_X87 is set, we want SSE2
# support in the C code too so that the same binary is built in both
# cases.  If neither is set, then we don't want any SSE2 support at
# all.
ifdef FEATURE_X87
CPP_DEFINE_OPTIONS += -DFEATURE_SSE2
else
ifdef FEATURE_SSE2
CPP_DEFINE_OPTIONS += -DFEATURE_SSE2
endif
endif

# Enable support for Unicode
ifdef FEATURE_UNICODE
CPP_DEFINE_OPTIONS += -DUNICODE
endif

# Sparc is always elf.
CPP_DEFINE_OPTIONS += -DFEATURE_ELF

CPPFLAGS += -I. -I$(PATH1) $(CC_V8PLUS) $(CPP_DEFINE_OPTIONS)


CFLAGS += -g $(CC_V8PLUS)

NM = $(PATH1)/solaris-nm
ASSEM_SRC = sparc-assem.S
ARCH_SRC = sparc-arch.c

DEPEND=$(CC) 
OS_SRC = solaris-os.c os-common.c elf.c
OS_LIBS= -lsocket -lnsl -ldl
EXEC_FINAL_OBJ = exec-final.o
