xref: /titanic_44/usr/src/cmd/sgs/m4/i386/Makefile (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23#ident	"%Z%%M%	%I%	%E% SMI"
24#
25# Copyright (c) 1995 by Sun Microsystems, Inc.
26# All rights reserved.
27#
28# cmd/sgs/m4/i386/Makefile
29#
30
31PROG=		m4
32XPG4PROG=	m4
33
34include 	../../../Makefile.cmd
35
36COBJS=		m4.o  m4ext.o  m4macs.o
37
38YOBJS=		m4objs/m4y.o
39XPG4YOBJS=	m4objs.xpg4/m4y_xpg4.o
40
41OBJS=		$(COBJS:%=m4objs/%) $(YOBJS)
42XPG4OBJS=	$(COBJS:%=m4objs.xpg4/%) $(XPG4YOBJS)
43ALLOBJS=	$(OBJS) $(XPG4OBJS)
44
45BLTSRCS=	../common/m4y.c ../common/m4y_xpg4.c
46
47SRCS=		$(COBJS:%.o=../common/%.c) $(BLTSRCS)
48
49INCLIST=	-I../common
50DEFLIST=	-DELF
51CPPFLAGS=	$(INCLIST) $(DEFLIST) $(CPPFLAGS.master)
52
53CLEANFILES +=	$(LINTOUT) $(BLTSRCS)
54
55m4objs.xpg4/%.o := CPPFLAGS += -DXPG4
56
57m4objs/%.o m4objs.xpg4/%.o: ../common/%.c
58		$(COMPILE.c) -o $@ $<
59
60.KEEP_STATE:
61
62all:		$(PROG) $(XPG4)
63
64$(PROG):	$(OBJS)
65		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
66		$(POST_PROCESS)
67
68$(XPG4):	$(XPG4OBJS)
69		$(LINK.c) $(XPG4OBJS) -o $@ $(LDLIBS)
70		$(POST_PROCESS)
71
72$(OBJS):	m4objs
73
74$(XPG4OBJS):	m4objs.xpg4
75
76m4objs m4objs.xpg4:
77		-@mkdir -p $@
78
79install:	all $(ROOTCCSBINPROG) $(ROOTXPG4PROG)
80
81clean:
82		$(RM) $(ALLOBJS) $(CLEANFILES)
83
84lint:		$(LINTOUT)
85
86$(LINTOUT):	$(SRCS)
87		$(LINT.c) $(SRCS) > $(LINTOUT) 2>&1
88
89include		../../../Makefile.targ
90