Hi Jens,
On Monday 27 October 2008 13:24:21 Jens Eden wrote:
in Epics versions before R3.14.10-RC2, it was possible to build
for a specific target arch only.
e.g.
make vxWorks-68040
would create dirs O.Common and O.vxWorks-68040 only in R3.14.9,
In R3.14.10-RC2 the host arch will be built too and you end up with
O.Common, O.vxWorks-68040 and O.linux-x86.
This is a problem, because not all apps are supposed to compile with
the host arch.
Janet has managed to fix this for the final release, but I would actually
recommend that you fix the Makefile in those apps and not have to use that
technique at all.
There are a number of variables that allow you to restrict the architectures
that your code is compiled for, and if you get these right the problem
vanishes. For example, instead of
LIBRARY = app
if you say
LIBRARY_vxWorks = app
then that library will only be compiled for vxWorks targets. You'll still get
an O.linux-x86 directory, but it will be empty.
Here's an example Makefile from drvIpac/tyGSOctal, which creates a library
libTyGSOctal.a on vxWorks and RTEMS, and uses a different C source file for
each OS. On other OSs it does nothing:
# Makefile
TOP = ..
include $(TOP)/configure/CONFIG
DBD += tyGSOctal.dbd
LIBSRCS_vxWorks += tyGSOctal.c
LIBSRCS_RTEMS += tyGSOctal_RTEMS.c
LIBRARY_IOC_vxWorks = TyGSOctal
LIBRARY_IOC_RTEMS = TyGSOctal
TyGSOctal_LIBS += Ipac
include $(TOP)/configure/RULES
The only thing the build system doesn't provide is the ability to restrict
builds to a specific target architecture rather than an OS class. It's not
hard to do that yourself in the Makefile if you really need it though; I can
explain how on request.
- Andrew