1 # 2 # CDDL HEADER START 3 # 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. 7 # 8 # You can obtain a copy of the license at src/sun_nws/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. 12 # 13 # When distributing Covered Code, include this CDDL HEADER in each 14 # file and include the License file at src/sun_nws/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] 18 # 19 # CDDL HEADER END 20 # 21 # 22 # Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 #ident "@(#)Makefile.libs 1.11 07/05/21 SMI" 26 # 27 # src/sun_nws/Makefile.libs 28 29 DEBUG = -g 30 # if NONDEBUG is set: 31 $(NONDEBUG)DEBUG = 32 33 # 34 # Don't build 64-bit libraries for x86 35 # 36 37 #i386_BUILD64= $(POUND_SIGN) 38 BUILD64= $($(MACH)_BUILD64) 39 40 41 INCLUDES = -I$(HDRS) 42 INCLUDES += $(COMMON_INCLUDES) 43 INCLUDES += -Y I,$(ON_REF_GATE)/proto/root_$(MACH)/usr/include 44 45 CCINCLUDES = -I$(HDRS) 46 CCINCLUDES += $(COMMON_INCLUDES) 47 CCINCLUDES += -I$(ON_REF_GATE)/proto/root_$(MACH)/usr/include 48 49 TEXT_DOMAIN= SUNW_OST_OSLIB 50 DTEXTDOM=-DTEXT_DOMAIN=\"$(TEXT_DOMAIN)\" 51 52 sparc_CFLAGS32 = -xO3 53 sparc_CFLAGS32 += -xarch=v8 54 sparc_CFLAGS32 += -xregs=no%appl 55 sparc_CFLAGS32 += $(sparc_C_PICFLAGS) 56 sparc_CFLAGS32 += -xspace 57 sparc_CFLAGS32 += -W0,-Lt 58 sparc_CFLAGS32 += -Xa 59 sparc_CFLAGS32 += -xildoff 60 sparc_CFLAGS32 += -errtags=yes 61 sparc_CFLAGS32 += -errwarn=%all 62 sparc_CFLAGS32 += -erroff=E_EMPTY_TRANSLATION_UNIT 63 sparc_CFLAGS32 += -erroff=E_STATEMENT_NOT_REACHED 64 sparc_CFLAGS32 += -xc99=%none 65 sparc_CFLAGS32 += -Wd,-xsafe=unboundsym 66 sparc_CFLAGS32 += -Wc,-Qassembler-ounrefsym=0 67 68 69 i386_CFLAGS32 = -xO2 70 i386_CFLAGS32 += $(i386_C_PICFLAGS) 71 i386_CFLAGS32 += -Xa 72 i386_CFLAGS32 += -xildoff 73 i386_CFLAGS32 += -errtags=yes 74 i386_CFLAGS32 += -errwarn=%all 75 i386_CFLAGS32 += -erroff=E_EMPTY_TRANSLATION_UNIT 76 i386_CFLAGS32 += -erroff=E_STATEMENT_NOT_REACHED 77 i386_CFLAGS32 += -xc99=%none 78 79 CFLAGS32 = $($(MACH)_CFLAGS32) 80 81 sparc_CFLAGS64 = -xO3 82 sparc_CFLAGS64 += -xarch=v9 83 sparc_CFLAGS64 += -dalign 84 sparc_CFLAGS64 += -v 85 sparc_CFLAGS64 += -Wc,-Qiselect-regsym=0 86 sparc_CFLAGS64 += $(SPARC64_CFLAGS) 87 sparc_CFLAGS64 += -xspace 88 sparc_CFLAGS64 += -W0,-Lt 89 sparc_CFLAGS64 += -Xa 90 sparc_CFLAGS64 += -xildoff 91 sparc_CFLAGS64 += -errtags=yes 92 sparc_CFLAGS64 += -errwarn=%all 93 sparc_CFLAGS64 += -erroff=E_EMPTY_TRANSLATION_UNIT 94 sparc_CFLAGS64 += -erroff=E_STATEMENT_NOT_REACHED 95 sparc_CFLAGS64 += -xc99=%none 96 sparc_CFLAGS64 += -Wd,-xsafe=unboundsym 97 sparc_CFLAGS64 += -Wc,-Qassembler-ounrefsym=0 98 99 i386_CFLAGS64 = -xO3 100 i386_CFLAGS64 += -xarch=amd64 101 i386_CFLAGS64 += -v 102 i386_CFLAGS64 += $(i386_C_PICFLAGS) 103 i386_CFLAGS64 += -xspace 104 i386_CFLAGS64 += -Xa 105 i386_CFLAGS64 += -xildoff 106 i386_CFLAGS64 += -errtags=yes 107 i386_CFLAGS64 += -errwarn=%all 108 i386_CFLAGS64 += -erroff=E_EMPTY_TRANSLATION_UNIT 109 i386_CFLAGS64 += -erroff=E_STATEMENT_NOT_REACHED 110 i386_CFLAGS64 += -xc99=%none 111 112 CFLAGS64 = $($(MACH)_CFLAGS64) 113 114 sparc_CCFLAGS32 = -cg89 115 sparc_CCFLAGS32 += -xarch=v8 116 sparc_CCFLAGS32 += -Qoption fbe 117 sparc_CCFLAGS32 += -cg92 118 sparc_CCFLAGS32 += -Qoption ccfe 119 sparc_CCFLAGS32 += -messages=no%anachronism 120 sparc_CCFLAGS32 += -mt 121 sparc_CCFLAGS32 += -compat=5 122 sparc_CCFLAGS32 += $(DEBUG) 123 sparc_CCFLAGS32 += -pic 124 sparc_CCFLAGS32 += -DTEXT_DOMAIN=\"SUNW_OST_OSLIB\" 125 sparc_CCFLAGS32 += +w 126 127 128 # 129 # Uncomment the following to error on warnings 130 # 131 #sparc_CCFLAGS32 += -xwe 132 133 CCFLAGS32 = $($(MACH)_CCFLAGS32) 134 135 sparc_CCFLAGS64 = -cg89 136 sparc_CCFLAGS64 += -xarch=v9 137 sparc_CCFLAGS64 += -Qoption fbe 138 sparc_CCFLAGS64 += -cg92 139 sparc_CCFLAGS64 += -Qoption ccfe 140 sparc_CCFLAGS64 += -messages=no%anachronism 141 sparc_CCFLAGS64 += -mt 142 sparc_CCFLAGS64 += -compat=5 143 sparc_CCFLAGS64 += $(DEBUG) 144 sparc_CCFLAGS64 += -pic 145 sparc_CCFLAGS64 += -DTEXT_DOMAIN=\"SUNW_OST_OSLIB\" 146 sparc_CCFLAGS64 += +w 147 # 148 # Uncomment the following to error on warnings 149 # 150 #sparc_CCFLAGS64 += -xwe 151 152 i386_CCFLAGS64 = -xarch=amd64 153 i386_CCFLAGS64 += -pic 154 155 CCFLAGS64 = $($(MACH)_CCFLAGS64) 156 157 CPPFLAGS32 = $(DTEXTDOM) 158 CPPFLAGS32 += -D_TS_ERRNO 159 CPPFLAGS32 += -DPIC 160 CPPFLAGS32 += -D_REENTRANT 161 162 CPPFLAGS64 = $(CPPFLAGS32) 163 164 # Lint Flags ?? 165 LFLAGS32 = -uaxs 166 LFLAGS32 += $(DTEXTDOM) 167 LFLAGS32 += -D_TS_ERRNO 168 169 sparc_LFLAGS64 = -Xa 170 sparc_LFLAGS64 += -nsxmuF 171 sparc_LFLAGS64 += -errtags=yes 172 sparc_LFLAGS64 += -Xarch=v9 173 174 i386_LFLAGS64 = -Xa 175 i386_LFLAGS64 += -nsxmuF 176 i386_LFLAGS64 += -Xarch=amd64 177 178 LFLAGS64 = $($(MACH)_LFLAGS64) 179 180 LDEF32 = -errtags=yes 181 LDEF32 += -s 182 LDEF32 += -erroff=E_PTRDIFF_OVERFLOW 183 LDEF32 += -erroff=E_ASSIGN_NARROW_CONV 184 LDEF32 += -Xc99=%none 185 186 sparc_LDEF64 = -Xarch=v9 187 188 i386_LDEF64 = -Xarch=amd64 189 190 LDEF64 = $(LDEF32) 191 LDEF64 += $($(MACH)_LDEF64) 192 193 194 DEF_STRIPFLAG=-s 195 STRIPFLAG=$(DEF_STRIPFLAG) 196 197 DYNFLAGS = -h $(DYNLIB) 198 DYNFLAGS += -z text 199 DYNFLAGS += -z defs 200 DYNFLAGS += -z combreloc 201 DYNFLAGS += -M $(ON_REF_GATE)/usr/src/common/mapfiles/$(MACH)/map.pagealign 202 203 LINK32 = $(CC) -o $@ -G $(DYNFLAGS) $(MODULE_OBJ_32) $(LDLIBS32) 204 LINK64 = $(CC) $(CFLAGS64) -o $@ -G $(DYNFLAGS) $(MODULE_OBJ_64) $(LDLIBS64) 205