Subject: linking? Possible machine diffs?
To: None <tech-pkg@NetBSD.ORG>
From: None <>
List: tech-pkg
Date: 07/23/1998 13:01:36
I'm working on a package for scilab-2.4 (very similar to matlab, a
powerful scientific computing/programming environment).  I'm almost there
but have 1 piece to go.  scilab allows on the fly linking in of c and/or
fortran routines (which run faster than routines written within scilab).
Their linking code has several flavors with many 
#ifdef {stuff like 'linux' 'hppa' 'hpux' 'mips' 'hpold' 'sparc', 'ELF'}
lines to include the correct versions of the linking code.  Anyway, I'm
really not up on all the different machines that NetBSD runs on, but
wonder if this part of the code will need to vary depending on which
machine.  So my question is really this:

I see in

# Data-driven table using make variables to control how 
# toolchain-dependent targets and shared libraries are built
# for different platforms and object formats.
# OBJECT_FMT:           currently either "ELF" or "a.out".
# SHLIB_TYPE:           "ELF" or "a.out" or "" to force static libraries.
.if (${MACHINE_ARCH} == "alpha") || \
    (${MACHINE_ARCH} == "mips") || \
    (${MACHINE_ARCH} == "powerpc")

Does this mean that somehow I should have make add 

based on OBJECT_FMT

and use those flags in the code to select 1 of 2 versions?

I guess the good news is I have a pmax and a mac68k so I should be able to
test both a.out and ELF versions.

Am I even close to the right track here?