xref: /illumos-gate/usr/src/grub/grub-0.97/Makefile.solaris.defs (revision 81a867407659fae007ac4ca95e5685c1d38fa5f1)
1#
2# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4# Copyright 2016 Nexenta Systems, Inc.
5#
6include $(SRC)/Makefile.master
7
8.KEEP_STATE:
9
10VERSION		= 0.95
11
12# $(POUND_SIGN) is just a #.  Used to turn a feature off.
13# The $(POUND_SIGN)POUND_SIGN:sh construct is just so make doesn't have to
14# spawn a shell and redefine POUND_SIGN if it is already defined (e.g.
15# $(SRC)/Makefile.master was already included).
16$(POUND_SIGN)POUND_SIGN:sh = echo '\043'
17
18
19#
20# Optional features (set to $(POUND_SIGN) to turn off):
21#
22# OPTION_UTILS:
23#	Build the userland utilities.
24#	NOTE: these utilities will be installed in
25#	      /platform/$(PLATFORM)/boot/grub, not /boot/grub.
26#
27# OPTION_DOCS:
28#	Build and install some GRUB documentations, e.g. man and info files.
29#	NOTE: these docs will be installed in
30#	      /platform/$(PLATFORM)/boot/grub, not /boot/grub.
31#
32# OPTION_FS:
33#	Build additional filesystem support into GRUB. This will increase
34#	the sizes of stage2 and pxegrub and may cause malfunction.
35#
36# STAGE2_NETBOOT:
37#	Include netboot support in stage2 (on by default).
38#	This only affects stage2, not pxegrub (diskless support).
39#
40# STAGE2_NETBOOT	= $(POUND_SIGN)
41OPTION_UTILS	= $(POUND_SIGN)
42OPTION_DOCS	= $(POUND_SIGN)
43OPTION_FS	= $(POUND_SIGN)
44
45
46BASE_CFLAGS	= -B$(GCC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS) -std=gnu89
47BASE_CCASFLAGS	= -B$(GCC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS)
48BASE_LDFLAGS	=
49
50CC		= $(GCC_ROOT)/bin/gcc
51CFLAGS		= $(BASE_CFLAGS)
52CCDEPMODE	= depmode=none
53
54CCAS		= $(CC)
55CCASFLAGS	= $(BASE_CCASFLAGS)
56
57CPP		= $(CC) -E
58
59# $(ENVCPPFLAGS4), if defined, should be something like "-Y I,somepath".
60# We want to get rid of the "-Y I," part but make's pattern replacement
61# macro reference doesn't allow spaces in it, e.g. $(ENVCPPFLAGS4:-Y I,%=%).
62# So we'll get rid of the "-Y" now and then the "I," later.  By the way, this
63# should also work in case $(ENVCPPFLAGS4) is "-YI,somepath" (no space).
64t.ENVCPPFLAGS4	= $(ENVCPPFLAGS4:-Y%=%)
65
66CPPFLAGS	= $(DEFS) $(INCLUDES) $(WARNFLAGS) \
67		  $(ENVCPPFLAGS1:-I%=-isystem %) \
68		  $(ENVCPPFLAGS2:-I%=-isystem %) \
69		  $(ENVCPPFLAGS3:-I%=-isystem %) \
70		  $(t.ENVCPPFLAGS4:I,%=-nostdinc -isystem %)
71
72CCLD		= $(GNU_ROOT)/bin/gld
73LDFLAGS		= $(BASE_LDFLAGS)
74LINKFLAGS	= -g
75LINK		= $(CCLD) $(LINKFLAGS) $(LDFLAGS)
76
77DEFS		= -DHAVE_CONFIG_H -DSOLARIS_NETBOOT
78OPTFLAGS	= -falign-jumps=1 -falign-loops=1 -falign-functions=1
79OPTFLAGS	+= -fno-reorder-functions
80#WARNFLAGS	= -Wall -Wmissing-prototypes -Wunused -Wshadow \
81#		  -Wpointer-arith -Wundef
82
83OBJCOPY		= $(GNU_ROOT)/bin/gobjcopy
84
85AR		= /usr/ccs/bin/ar
86RANLIB		= :
87
88MKDIR		= mkdir -p
89