comm: add -Wall
[unleashed.git] / usr / src / cmd / sgs / Makefile.com
blobbfbd87b61fb0825a07dbb86712ae975256e11593
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
23 # Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2016 RackTop Systems.
27 .KEEP_STATE:
28 .KEEP_STATE_FILE: .make.state.$(MACH)
31 include         $(SRC)/cmd/sgs/Makefile.var
33 SRCBASE =       ../../../..
35 i386_ARCH =     intel
36 sparc_ARCH =    sparc
38 ARCH =          $($(MACH)_ARCH)
40 # Establish any global flags.
42 # Setting DEBUG = -DDEBUG (or "make DEBUG=-DDEBUG ...") enables ASSERT()
43 # checking.  This is automatically enabled for DEBUG builds, not for non-debug
44 # builds.  Unset the global CSTD_GNU89 flag to insure we uncover all compiler
45 # warnings/errors.
46 DEBUG =
47 $(NOT_RELEASE_BUILD)DEBUG = -DDEBUG
49 CSTD_GNU89 =    $(CSTD_GNU99)
51 CFLAGS +=       $(DEBUG)
52 CFLAGS64 +=     $(DEBUG)
54 CERRWARN +=     -Wno-type-limits
55 CERRWARN +=     -Wno-parentheses
56 CERRWARN +=     -Wno-unused-value
59 # Location of the shared elfcap code
61 ELFCAP=         $(SRC)/common/elfcap
63 # Reassign CPPFLAGS so that local search paths are used before any parent
64 # $ROOT paths.
65 CPPFLAGS =      -I. -I../common -I../../include -I../../include/$(MACH) \
66                 $(CPPFLAGS.master) -I$(ELFCAP)
68 # PICS64 is unique to our environment
69 $(PICS64) :=    sparc_CFLAGS += -mno-app-regs -fpic
70 $(PICS64) :=    sparcv9_CFLAGS += -mno-app-regs -fpic
71 $(PICS64) :=    CPPFLAGS += -DPIC
73 LDFLAGS +=      $(ZIGNORE)
74 DYNFLAGS +=     $(ZIGNORE)
76 # Establish the local tools, proto and package area.
78 SGSHOME =       $(SRC)/cmd/sgs
79 SGSPROTO =      $(SGSHOME)/proto/$(MACH)
80 SGSTOOLS =      $(SGSHOME)/tools
81 SGSMSGID =      $(SGSHOME)/messages
82 SGSMSGDIR =     $(SGSHOME)/messages/$(MACH)
83 SGSONLD =       $(ROOT)/opt/SUNWonld
84 SGSRPATH =      /usr/lib
85 SGSRPATH64 =    $(SGSRPATH)/$(MACH64)
87 # Mimic the structure of an installed system.
89 SGSLIBDIR =     $(SGSPROTO)/lib
90 SGSPREFIX =     $(SGSPROTO)/usr
91 SGSBINDIR =     $(SGSPREFIX)/bin
94 # Macros to be used to include link against libconv and include vernote.o
96 VERSREF =       -ulink_ver_string
98 LDLIBDIR =      -L$(SGSHOME)/libld/$(MACH)
99 LDLIBDIR64 =    -L$(SGSHOME)/libld/$(MACH64)
101 CONVLIBDIR =    -L$(SGSHOME)/libconv/$(MACH)
102 CONVLIBDIR64 =  -L$(SGSHOME)/libconv/$(MACH64)
104 ELFLIBDIR =     -L$(SGSHOME)/libelf/$(MACH)
105 ELFLIBDIR64 =   -L$(SGSHOME)/libelf/$(MACH64)
107 LDDBGLIBDIR =   -L$(SGSHOME)/liblddbg/$(MACH)
108 LDDBGLIBDIR64 = -L$(SGSHOME)/liblddbg/$(MACH64)
111 # The cmd/Makefile.com and lib/Makefile.com define TEXT_DOMAIN.  We don't need
112 # this definition as the sgs utilities obtain their domain via sgsmsg(1l).
114 DTEXTDOM =
116 # Define any generic sgsmsg(1l) flags.  The default message generation system
117 # is to use gettext(3i), add the -C flag to switch to catgets(3c).
119 SGSMSG =                $(SGSTOOLS)/$(MACH)/sgsmsg
120 SGSMSG_PIGLATIN_NL =    perl $(SGSTOOLS)/common/sgsmsg_piglatin_nl.pl
121 CHKMSG =                $(SGSTOOLS)/chkmsg.sh
123 SGSMSGVFLAG =
124 SGSMSGFLAGS =   $(SGSMSGVFLAG) -i $(SGSMSGID)/sgs.ident
125 CHKMSGFLAGS =   $(SGSMSGTARG:%=-m %) $(SGSMSGCHK:%=-m %)
127 # Native targets should use the minimum of ld(1) flags to allow building on
128 # previous releases.  We use mapfiles to scope, but don't bother versioning.
130 native :=       DYNFLAGS = -R$(SGSLIBDIR) -L$(SGSLIBDIR) $(ZNOVERSION) \
131                         $(HSONAME)
133 # Comment out the following two lines to have the sgs built from the system
134 # link-editor, rather than the local proto link-editor.
135 #CC_USE_PROTO = -B$(SGSBINDIR)
136 #LD_USE_PROTO = $(SGSBINDIR)/
138 LIBNAME32 =     $(LIBNAME:%=%32)
139 LIBNAME64 =     $(LIBNAME:%=%64)
140 LIBNAMES =      $(LIBNAME32) $(LIBNAME64)
142 LD_LIB =        -lld
143 LD_LIB32 =      -lld32
144 LD_LIB64 =      -lld64
146 LDDBG_LIB =     -llddbg
147 LDDBG_LIB32 =   -llddbg32
148 LDDBG_LIB64 =   -llddbg64
150 CONV_LIB =      -lconv
151 CONV_LIB32 =    -lconv32
152 CONV_LIB64 =    -lconv64