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 567298654Sdamico# Common Development and Distribution License (the "License"). 667298654Sdamico# 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# 221dd08564Sab196087# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 239fb11590Smike_s# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gatePROG= m4 277c478bd9Sstevel@tonic-gateXPG4PROG= m4 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gateinclude ../../../Makefile.cmd 3067298654Sdamicoinclude ../../../sgs/Makefile.var 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gateCOBJS= m4.o m4ext.o m4macs.o 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gateYOBJS= m4objs/m4y.o 357c478bd9Sstevel@tonic-gateXPG4YOBJS= m4objs.xpg4/m4y_xpg4.o 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gateOBJS= $(COBJS:%=m4objs/%) $(YOBJS) 387c478bd9Sstevel@tonic-gateXPG4OBJS= $(COBJS:%=m4objs.xpg4/%) $(XPG4YOBJS) 397c478bd9Sstevel@tonic-gateALLOBJS= $(OBJS) $(XPG4OBJS) 407c478bd9Sstevel@tonic-gate 411dd08564Sab196087YBLTSRCS= ../common/m4y.c 421dd08564Sab196087XPG4BLTSRCS= ../common/m4y_xpg4.c 431dd08564Sab196087BLTSRCS= $(YBLTSRCS) $(XPG4BLTSRCS) 447c478bd9Sstevel@tonic-gate 451dd08564Sab196087YSRCS= $(COBJS:%.o=../common/%.c) $(YBLTSRCS) 461dd08564Sab196087XPG4SRCS= $(COBJS:%.o=../common/%.c) $(XPG4BLTSRCS) 477c478bd9Sstevel@tonic-gateSRCS= $(COBJS:%.o=../common/%.c) $(BLTSRCS) 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gateINCLIST= -I../common 507c478bd9Sstevel@tonic-gateDEFLIST= -DELF 517c478bd9Sstevel@tonic-gateCPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) 529fb11590Smike_sCFLAGS += $(CCVERBOSE) 53*bd0ce624SYuri PankovCSTD= $(CSTD_GNU99) 547c478bd9Sstevel@tonic-gate 557014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 567014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-label 577014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized 587014882cSRichard Lowe 591dd08564Sab196087LINTFLAGS += $(LDLIBS) 607c478bd9Sstevel@tonic-gateCLEANFILES += $(LINTOUT) $(BLTSRCS) 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gatem4objs.xpg4/%.o := CPPFLAGS += -DXPG4 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gatem4objs/%.o m4objs.xpg4/%.o: ../common/%.c 657c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate.KEEP_STATE: 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gateall: $(PROG) $(XPG4) 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gate$(PROG): $(OBJS) 727c478bd9Sstevel@tonic-gate $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 737c478bd9Sstevel@tonic-gate $(POST_PROCESS) 747c478bd9Sstevel@tonic-gate 757c478bd9Sstevel@tonic-gate$(XPG4): $(XPG4OBJS) 767c478bd9Sstevel@tonic-gate $(LINK.c) $(XPG4OBJS) -o $@ $(LDLIBS) 777c478bd9Sstevel@tonic-gate $(POST_PROCESS) 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gate$(OBJS): m4objs 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate$(XPG4OBJS): m4objs.xpg4 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gatem4objs m4objs.xpg4: 847c478bd9Sstevel@tonic-gate -@mkdir -p $@ 857c478bd9Sstevel@tonic-gate 8667298654Sdamicoinstall: all $(VAR_SGSBINPROG) $(ROOTXPG4PROG) $(VAR_SGSCCSLINK) 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gateclean: 897c478bd9Sstevel@tonic-gate $(RM) $(ALLOBJS) $(CLEANFILES) 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gatelint: $(LINTOUT) 927c478bd9Sstevel@tonic-gate 931dd08564Sab196087LINT_HDR= perl ../../tools/lint_hdr.pl 941dd08564Sab196087 957c478bd9Sstevel@tonic-gate$(LINTOUT): $(SRCS) 961dd08564Sab196087 $(LINT_HDR) $(PROG) > $(LINTOUT) 971dd08564Sab196087 $(LINT_HDR) -s m4 >> $(LINTOUT) 981dd08564Sab196087 $(LINT.c) $(YSRCS) 2>&1 | tee -a $(LINTOUT) 991dd08564Sab196087 1001dd08564Sab196087 $(LINT_HDR) -s "XPG m4" >> $(LINTOUT) 1011dd08564Sab196087 $(LINT.c) $(XPG4SRCS) 2>&1 | tee -a $(LINTOUT) 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ 104