xref: /titanic_50/usr/src/cmd/sgs/m4/sparc/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
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# cmd/sgs/m4/sparc/Makefile
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gatePROG=		m4
297c478bd9Sstevel@tonic-gateXPG4PROG=	m4
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gateinclude 	../../../Makefile.cmd
3267298654Sdamicoinclude		../../../sgs/Makefile.var
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gateCOBJS=		m4.o  m4ext.o  m4macs.o
357c478bd9Sstevel@tonic-gate
367c478bd9Sstevel@tonic-gateYOBJS=		m4objs/m4y.o
377c478bd9Sstevel@tonic-gateXPG4YOBJS=	m4objs.xpg4/m4y_xpg4.o
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gateOBJS=		$(COBJS:%=m4objs/%) $(YOBJS)
407c478bd9Sstevel@tonic-gateXPG4OBJS=	$(COBJS:%=m4objs.xpg4/%) $(XPG4YOBJS)
417c478bd9Sstevel@tonic-gateALLOBJS=	$(OBJS) $(XPG4OBJS)
427c478bd9Sstevel@tonic-gate
431dd08564Sab196087YBLTSRCS=	../common/m4y.c
441dd08564Sab196087XPG4BLTSRCS=	../common/m4y_xpg4.c
451dd08564Sab196087BLTSRCS=	$(YBLTSRCS) $(XPG4BLTSRCS)
467c478bd9Sstevel@tonic-gate
471dd08564Sab196087YSRCS=		$(COBJS:%.o=../common/%.c) $(YBLTSRCS)
481dd08564Sab196087XPG4SRCS=	$(COBJS:%.o=../common/%.c) $(XPG4BLTSRCS)
497c478bd9Sstevel@tonic-gateSRCS=		$(COBJS:%.o=../common/%.c) $(BLTSRCS)
507c478bd9Sstevel@tonic-gate
517c478bd9Sstevel@tonic-gateINCLIST=	-I../common
527c478bd9Sstevel@tonic-gateDEFLIST=	-DELF
537c478bd9Sstevel@tonic-gateCPPFLAGS=	$(INCLIST) $(DEFLIST) $(CPPFLAGS.master)
549fb11590Smike_sCFLAGS +=	$(CCVERBOSE)
55*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
56*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-label
57*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-uninitialized
589fb11590Smike_sC99MODE=	$(C99_ENABLE)
597c478bd9Sstevel@tonic-gate
601dd08564Sab196087LINTFLAGS +=	$(LDLIBS)
617c478bd9Sstevel@tonic-gateCLEANFILES +=	$(LINTOUT) $(BLTSRCS)
627c478bd9Sstevel@tonic-gate
637c478bd9Sstevel@tonic-gatem4objs.xpg4/%.o := CPPFLAGS += -DXPG4
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gatem4objs/%.o m4objs.xpg4/%.o: ../common/%.c
667c478bd9Sstevel@tonic-gate		$(COMPILE.c) -o $@ $<
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gate.KEEP_STATE:
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gateall:		$(PROG) $(XPG4)
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gate$(PROG):	$(OBJS)
737c478bd9Sstevel@tonic-gate		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
747c478bd9Sstevel@tonic-gate		$(POST_PROCESS)
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gate$(XPG4):	$(XPG4OBJS)
777c478bd9Sstevel@tonic-gate		$(LINK.c) $(XPG4OBJS) -o $@ $(LDLIBS)
787c478bd9Sstevel@tonic-gate		$(POST_PROCESS)
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gate$(OBJS):	m4objs
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gate$(XPG4OBJS):	m4objs.xpg4
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gatem4objs m4objs.xpg4:
857c478bd9Sstevel@tonic-gate		-@mkdir -p $@
867c478bd9Sstevel@tonic-gate
8767298654Sdamicoinstall:	all $(VAR_SGSBINPROG) $(ROOTXPG4PROG) $(VAR_SGSCCSLINK)
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