# -*- makefile -*- for the C-level run-time support for SBCL

# This software is part of the SBCL system. See the README file for
# more information.
#
# This software is derived from the CMU CL system, which was
# written at Carnegie Mellon University and released into the
# public domain. The software is in the public domain and is
# provided with absolutely no warranty. See the COPYING and CREDITS
# files for more information.

CFLAGS += -Dosf1 -O0 -g -D_XOPEN_SOURCE=500 -D_OSF_SOURCE=500
CFLAGS += -msg_disable newlocale
ASFLAGS += -Dosf1 #-ULANGUAGE_ASSEMBLY
LD = ld -xtaso
LINKFLAGS = -non_shared # dynamic -v -g  -Wl,-T  -Wl,ld-script.alpha-linux
# Digital^WCompaq^WHP's cc declares `static inline' functions to exist
# in multiple places in the binary; we add the '-g' flag to suppress all
# internal (i.e. static) function names being spat out.  GENESIS
# complains about the multiple references and they aren't referenceable
# by anything outside the binary anyway.
NM = nm -B -g

ASSEM_SRC = alpha-assem.s # ldso-stubs.s
ARCH_SRC = alpha-arch.c undefineds.c

# cancel gnumake's builtin rule for .S files, because digital's cc doesn't
# know what to do with them
%.o: %.S

# copy .S files to .s, because digital cc does know what to do with _those_
%.s:%.S
	cp $^ $@

# ... and let the main makefile clean the .s properly.
OS_CLEAN_FILES += $(ASSEM_SRC)

OS_SRC = osf1-os.c alpha-osf1-os.c
OS_LIBS = #-ldl
ifdef LISP_FEATURE_SB_CORE_COMPRESSION
  OS_LIBS += -lz
endif

GC_SRC = cheneygc.c

# Nothing to do for after-grovel-headers.
.PHONY: after-grovel-headers
after-grovel-headers:
