17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 580ab886dSwesolows# Common Development and Distribution License (the "License"). 680ab886dSwesolows# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 2224da5b34Srie# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 25aa9ef484SJohn Levon# Copyright 2018 Joyent, Inc. 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gatePROG = cw 287c478bd9Sstevel@tonic-gate 296cad8c54SRyan ZezeskiMAN1ONBLDFILES= cw.1onbld 3080ab886dSwesolows 317c478bd9Sstevel@tonic-gateinclude ../Makefile.tools 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gate# Bootstrap problem -- we have to build cw before we can use it 34*9b9d39d2SRichard LoweNATIVECC= $(NATIVE_GNUC_ROOT)/bin/gcc 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gateCFLAGS += $(CCVERBOSE) 377c478bd9Sstevel@tonic-gate 386a3e8e86SRichard Lowe# Override CFLAGS. This is needed only for bootstrap of cw. 398c426718SRichard LoweCFLAGS= -O -D__sun -Wall -Werror -std=gnu99 -nodefaultlibs 408c426718SRichard LoweLDLIBS += -Wl,-zassert-deflib=libc.so -lc 418c426718SRichard LoweLDFLAGS= $(MAPFILE.NES:%=-Wl,-M%) 428c426718SRichard LoweZASSERTDEFLIB = -Wl,-zassert-deflib 438c426718SRichard LoweZFATALWARNINGS = -Wl,-zfatal-warnings 448c426718SRichard LoweZGUIDANCE = -Wl,-zguidance 455801b0f0SToomas SoomeLDFLAGS += -Wl,$(ZDIRECT) 467c478bd9Sstevel@tonic-gate 476cad8c54SRyan Zezeski$(ROOTONBLDMAN1ONBLDFILES) := FILEMODE= 644 4888e61e85SRichard LoweCSTD= $(CSTD_GNU99) 4980ab886dSwesolows 50c0855578SRichard Lowe# Assume we don't have the install.bin available yet 51c0855578SRichard LoweINS.file= $(RM) $@; $(CP) $< $(@D); $(CHMOD) $(FILEMODE) $@ 52c0855578SRichard Lowe 537c478bd9Sstevel@tonic-gate.KEEP_STATE: 547c478bd9Sstevel@tonic-gate 556cad8c54SRyan Zezeskiall: $(PROG) $(MAN1ONBLDFILES) 567c478bd9Sstevel@tonic-gate 576cad8c54SRyan Zezeskiinstall: all .WAIT $(ROOTONBLDMACHPROG) $(ROOTONBLDMAN1ONBLDFILES) 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gateclean: 607c478bd9Sstevel@tonic-gate 61aa9ef484SJohn Levon# 62aa9ef484SJohn Levon# Not run by default: bootstrap... 63aa9ef484SJohn Levoncheck: 64aa9ef484SJohn Levon $(ROOTONBLDBINMACH)/mandoc -Tlint -Wwarning $(MAN1ONBLDFILES) 65aa9ef484SJohn Levon 667c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 67