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 usr/src/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 usr/src/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 "%Z%%M% %I% %E% SMI" 26# 27# cmd/sgs/m4/i386/Makefile 28# 29 30PROG= m4 31XPG4PROG= m4 32 33include ../../../Makefile.cmd 34include ../../../sgs/Makefile.var 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) 52CFLAGS += $(CCVERBOSE) 53C99MODE= $(C99_ENABLE) 54 55CLEANFILES += $(LINTOUT) $(BLTSRCS) 56 57m4objs.xpg4/%.o := CPPFLAGS += -DXPG4 58 59m4objs/%.o m4objs.xpg4/%.o: ../common/%.c 60 $(COMPILE.c) -o $@ $< 61 62.KEEP_STATE: 63 64all: $(PROG) $(XPG4) 65 66$(PROG): $(OBJS) 67 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 68 $(POST_PROCESS) 69 70$(XPG4): $(XPG4OBJS) 71 $(LINK.c) $(XPG4OBJS) -o $@ $(LDLIBS) 72 $(POST_PROCESS) 73 74$(OBJS): m4objs 75 76$(XPG4OBJS): m4objs.xpg4 77 78m4objs m4objs.xpg4: 79 -@mkdir -p $@ 80 81install: all $(VAR_SGSBINPROG) $(ROOTXPG4PROG) $(VAR_SGSCCSLINK) 82 83clean: 84 $(RM) $(ALLOBJS) $(CLEANFILES) 85 86lint: $(LINTOUT) 87 88$(LINTOUT): $(SRCS) 89 $(LINT.c) $(SRCS) > $(LINTOUT) 2>&1 90 91include ../../../Makefile.targ 92