SunOS.mk 1.41 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
AS         = $(CROSS_COMPILE)gas
LD         = $(CROSS_COMPILE)gld
CC         = $(CROSS_COMPILE)gcc
CPP        = $(CROSS_COMPILE)gcc -E
AR         = $(CROSS_COMPILE)gar
RANLIB     = $(CROSS_COMPILE)granlib
NM         = $(CROSS_COMPILE)gnm
STRIP      = $(CROSS_COMPILE)gstrip
OBJCOPY    = $(CROSS_COMPILE)gobjcopy
OBJDUMP    = $(CROSS_COMPILE)gobjdump
Keir Fraser's avatar
Keir Fraser committed
11
SIZEUTIL   = $(CROSS_COMPILE)gsize
12

13 14
MSGFMT     = gmsgfmt

15
SHELL      = bash
kfraser's avatar
kfraser committed
16

17
INSTALL      = ginstall
18 19 20
INSTALL_DIR  = $(INSTALL) -d -m0755 -p
INSTALL_DATA = $(INSTALL) -m0644 -p
INSTALL_PROG = $(INSTALL) -m0755 -p
21

22
PREFIX ?= /usr
Keir Fraser's avatar
Keir Fraser committed
23
BINDIR = $(PREFIX)/bin
Keir Fraser's avatar
Keir Fraser committed
24
INCLUDEDIR = $(PREFIX)/include
25 26 27
MANDIR = $(PREFIX)/share/man
MAN1DIR = $(MANDIR)/man1
MAN8DIR = $(MANDIR)/man8
Keir Fraser's avatar
Keir Fraser committed
28
SBINDIR = $(PREFIX)/sbin
29
XENFIRMWAREDIR = $(LIBDIR)/xen/boot
30

Keir Fraser's avatar
Keir Fraser committed
31 32 33
PRIVATE_PREFIX = $(LIBDIR)/xen
PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin

34 35 36 37 38 39 40 41
ifeq ($(PREFIX),/usr)
CONFIG_DIR = /etc
else
CONFIG_DIR = $(PREFIX)/etc
endif
XEN_CONFIG_DIR = $(CONFIG_DIR)/xen
XEN_SCRIPT_DIR = $(PRIVATE_PREFIX)/scripts

Keir Fraser's avatar
Keir Fraser committed
42 43
SunOS_LIBDIR = /usr/sfw/lib
SunOS_LIBDIR_x86_64 = /usr/sfw/lib/amd64
44

45
SOCKET_LIBS = -lsocket
46
PTHREAD_LIBS = -lpthread
Keir Fraser's avatar
Keir Fraser committed
47
UTIL_LIBS =
48 49
DLOPEN_LIBS = -ldl

50
SONAME_LDFLAG = -h
51
SHLIB_LDFLAGS = -R $(SunOS_LIBDIR) -shared
52

53
ifneq ($(debug),y)
54
CFLAGS += -O2 -fno-omit-frame-pointer
55 56
else
# Less than -O1 produces bad code and large stack frames
57
CFLAGS += -O1 -fno-omit-frame-pointer
58
endif
59

kfraser's avatar
kfraser committed
60 61
CFLAGS += -Wa,--divide -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__