1#ident "@(#)i586-linux-cc.rul	1.18 18/11/07 "
2###########################################################################
3# Written 1996-2018 by J. Schilling
4###########################################################################
5#
6# Platform dependent MACROS for Linux
7#
8###########################################################################
9# Copyright (c) J. Schilling
10###########################################################################
11# The contents of this file are subject to the terms of the
12# Common Development and Distribution License, Version 1.0 only
13# (the "License").  You may not use this file except in compliance
14# with the License.
15#
16# See the file CDDL.Schily.txt in this distribution for details.
17# A copy of the CDDL is also available via the Internet at
18# http://www.opensource.org/licenses/cddl1.txt
19#
20# When distributing Covered Code, include this CDDL HEADER in each
21# file and include the License file CDDL.Schily.txt from this distribution.
22###########################################################################
23include $(SRCROOT)/$(RULESDIR)/rules.prg
24###########################################################################
25include $(SRCROOT)/$(RULESDIR)/cc-g$(C_ARCH).rul
26
27#
28# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux
29#
30INCDIRSX +=	$(LINUX_SRC_INCLUDE)
31OSDEFS +=
32
33KDEFINES=	-DKERNEL -D_KERNEL
34
35LIB_PREFIX=	lib
36LIB_SUFFIX=	.a
37SHL_SUFFIX=	.so.$(DYNMAJOR).$(DYNMINOR)
38
39LIB_SOCKET=
40LIB_MATH=	-lm
41LIB_KVM=
42
43#
44# Sunpro C/C++ run on Solaris and Linux and both have linkers
45# that support mapfiles
46#
47MAPVERS=	$(_MAPVERS) # This enables to use mapfiles
48#
49# The GNU linker is buggy and does not like the official order in linker map
50# files for symbol versioning. The following command reverses the order of
51# the version names in the linker map file.
52#
53MAPFILE_POST=	| sed 's/^SCHILY/+SCHILY/' | tr '\012' '@' | tr '+' '\012' | sort -V |  tr '@' '\012'
54
55#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
56#
57# Uncomment the next line in case you are on an old Linux version that
58# does not support the -R linker flag.
59#
60#LDOPTS=		$(LIBS_PATH) $(LDPATH)
61LDOPTMAP=	$(PMAPVERS:%=-Wl,--version-script=%)
62LDOPTDYN=	-shared -Wl,-soname,$(TARGET) $(LDOPTMAP)
63
64LORDER=		echo
65TSORT=		cat
66