10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 51717Swesolows# Common Development and Distribution License (the "License"). 61717Swesolows# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 21*4271Srie# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 220Sstevel@tonic-gate# Use is subject to license terms. 230Sstevel@tonic-gate# 240Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 250Sstevel@tonic-gate# 260Sstevel@tonic-gate# cmd/geniconvtbl/Makefile.com 270Sstevel@tonic-gate 281717Swesolows$(NOT_NATIVE)NATIVE_BUILD = $(POUND_SIGN) 290Sstevel@tonic-gate 300Sstevel@tonic-gateITM = geniconvtbl.so 310Sstevel@tonic-gatePROG = geniconvtbl 320Sstevel@tonic-gate 330Sstevel@tonic-gateSRCSH1 = iconv_tm.h hash.h 340Sstevel@tonic-gateSRCCH1 = itmcomp.h itm_util.h maptype.h 350Sstevel@tonic-gateSRCSC1 = itmcomp.c assemble.c disassemble.c itm_util.c 360Sstevel@tonic-gateSRCY1 = itm_comp.y 370Sstevel@tonic-gateSRCL1 = itm_comp.l 380Sstevel@tonic-gateSRCI1 = geniconvtbl.c 390Sstevel@tonic-gate 400Sstevel@tonic-gate 410Sstevel@tonic-gateYTABC = y.tab.c 420Sstevel@tonic-gateYTABH = y.tab.h 430Sstevel@tonic-gateLEXYY = lex.yy.c 440Sstevel@tonic-gateYOUT = y.output 450Sstevel@tonic-gateMAPFILE = ../mapfile 460Sstevel@tonic-gate 470Sstevel@tonic-gate 480Sstevel@tonic-gate 490Sstevel@tonic-gateSRCSH = $(SRCSH1:%.h=../%.h) 500Sstevel@tonic-gateSRCCH = $(SRCCH1:%.h=../%.h) 510Sstevel@tonic-gateSRCSC = $(SRCSC1:%.c=../%.c) 520Sstevel@tonic-gateSRCI = $(SRCI1:%.c=../%.c) 530Sstevel@tonic-gateSRCY = $(SRCY1:%.y=../%.y) 540Sstevel@tonic-gateSRCL = $(SRCL1:%.l=../%.l) 550Sstevel@tonic-gate 560Sstevel@tonic-gateSRCYC = $(SRCY:%.y=%.c) 570Sstevel@tonic-gateSRCLC = $(SRCL:%.l=%.c) 580Sstevel@tonic-gate 590Sstevel@tonic-gateSRCS = $(SRCSC) $(YTABC) $(LEXYY) 600Sstevel@tonic-gateHDRS = $(SRCCH1) $(ERNOSTRH) 610Sstevel@tonic-gate 620Sstevel@tonic-gate 630Sstevel@tonic-gate 640Sstevel@tonic-gateSED = sed 650Sstevel@tonic-gateLEXSED = ../lex.sed 660Sstevel@tonic-gateYACCSED = ../yacc.sed 670Sstevel@tonic-gate 680Sstevel@tonic-gate 690Sstevel@tonic-gate 700Sstevel@tonic-gate# include ../../../lib/Makefile.lib 710Sstevel@tonic-gateinclude ../../Makefile.cmd 720Sstevel@tonic-gate 730Sstevel@tonic-gate 740Sstevel@tonic-gateROOTDIRS32= $(ROOTLIB)/iconv 750Sstevel@tonic-gateROOTDIRS64= $(ROOTLIB)/iconv/$(MACH64) 760Sstevel@tonic-gateROOTITM32 = $(ROOTDIRS32)/$(ITM) 770Sstevel@tonic-gateROOTITM64 = $(ROOTDIRS64)/$(ITM) 780Sstevel@tonic-gate 790Sstevel@tonic-gate# 800Sstevel@tonic-gate# definition for some useful target like clean, 810Sstevel@tonic-gateOBJS = $(SRCSC1:%.c=%.o) $(YTABC:.c=.o) $(LEXYY:.c=.o) 820Sstevel@tonic-gate 830Sstevel@tonic-gateCHECKHDRS = $(HDRS%.h=%.check) 840Sstevel@tonic-gate 851717SwesolowsCLOBBERFILES= $(ITM) 860Sstevel@tonic-gateCLEANFILES = $(OBJS) $(YTABC) $(YTABH) $(LEXYY) $(YOUT) \ 870Sstevel@tonic-gate $(POFILES) $(POFILE) 880Sstevel@tonic-gate 890Sstevel@tonic-gateCPPFLAGS += -I. -I.. 900Sstevel@tonic-gateYFLAGS += -d -v 910Sstevel@tonic-gateCFLAGS += -D_FILE_OFFSET_BITS=64 920Sstevel@tonic-gate 930Sstevel@tonic-gate$(ITM) := CFLAGS += $(GSHARED) $(C_PICFLAGS) $(ZTEXT) -h $@ 940Sstevel@tonic-gate$(ITM) := CPPFLAGS += -D_REENTRANT 950Sstevel@tonic-gate$(ITM) := sparc_CFLAGS += -xregs=no%appl 960Sstevel@tonic-gate$(ITM) := sparcv9_CFLAGS += -xregs=no%appl 970Sstevel@tonic-gate 980Sstevel@tonic-gateLDLIBS += -lgen 990Sstevel@tonic-gate 1001717SwesolowsMY_NATIVE_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -I. -I.. 101*4271SrieMY_NATIVE_LDFLAGS = $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) 1021717SwesolowsMY_NATIVE_LDLIBS = -lgen 1031717Swesolows 1040Sstevel@tonic-gate# 1050Sstevel@tonic-gate# Message catalog 1060Sstevel@tonic-gate# 1070Sstevel@tonic-gatePOFILES= $(SRCSC1:%.c=%.po) $(SRCI1:%.c=%.po) \ 1080Sstevel@tonic-gate $(SRCY1:%.y=%.po) $(SRCL1:%.l=%.po) 1090Sstevel@tonic-gate 1100Sstevel@tonic-gatePOFILE= geniconvtbl_.po 1110Sstevel@tonic-gate 1120Sstevel@tonic-gate 1130Sstevel@tonic-gate 1140Sstevel@tonic-gate 1150Sstevel@tonic-gate 1160Sstevel@tonic-gate.KEEP_STATE: 1170Sstevel@tonic-gate 1180Sstevel@tonic-gate.PARALLEL: $(ITM) $(OBJS) 1190Sstevel@tonic-gate 1200Sstevel@tonic-gate$(PROG): $(OBJS) 1210Sstevel@tonic-gate $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 1220Sstevel@tonic-gate $(POST_PROCESS) 1230Sstevel@tonic-gate 1240Sstevel@tonic-gate$(ITM): $(SRCI) 1250Sstevel@tonic-gate $(CC) $(CFLAGS) $(CPPFLAGS) -M$(MAPFILE) -o $@ $(SRCI) $(LDLIBS) 1260Sstevel@tonic-gate $(POST_PROCESS_SO) 1270Sstevel@tonic-gate 1280Sstevel@tonic-gate$(YTABC) $(YTABH): $(SRCY) 1290Sstevel@tonic-gate $(YACC) $(YFLAGS) $(SRCY) 1300Sstevel@tonic-gate @ $(MV) $(YTABC) $(YTABC)~ 1310Sstevel@tonic-gate @ $(SED) -f $(YACCSED) $(YTABC)~ > $(YTABC) 1320Sstevel@tonic-gate @ $(RM) $(YTABC)~ 1330Sstevel@tonic-gate 1340Sstevel@tonic-gate$(LEXYY): $(SRCL) $(YTABH) 1350Sstevel@tonic-gate $(LEX) -t $(SRCL) | $(SED) -f $(LEXSED) > $(LEXYY) 1360Sstevel@tonic-gate 1370Sstevel@tonic-gate 1380Sstevel@tonic-gate$(POFILE): .WAIT $(POFILES) 1390Sstevel@tonic-gate $(RM) $@ 1400Sstevel@tonic-gate $(CAT) $(POFILES) >$@ 1410Sstevel@tonic-gate 1420Sstevel@tonic-gate$(POFILES): $(SRCSC) $(SRCI) $(SRCY) $(SRCL) 1430Sstevel@tonic-gate 1440Sstevel@tonic-gate%.po: ../%.c 1450Sstevel@tonic-gate $(COMPILE.cpp) $< > $<.i 1460Sstevel@tonic-gate $(BUILD.po) 1470Sstevel@tonic-gate 1480Sstevel@tonic-gate 1490Sstevel@tonic-gatelint : lint_SRCS1 lint_SRCS2 1500Sstevel@tonic-gate 1510Sstevel@tonic-gate 1520Sstevel@tonic-gatelint_SRCS1: $(SRCS) 1530Sstevel@tonic-gate $(LINT.c) $(SRCS) $(LDLIBS) 1540Sstevel@tonic-gate 1550Sstevel@tonic-gatelint_SRCS2: $(SRCI) 1560Sstevel@tonic-gate $(LINT.c) $(SRCI) $(LDLIBS) 1570Sstevel@tonic-gate 1580Sstevel@tonic-gate 1590Sstevel@tonic-gate 1600Sstevel@tonic-gatehdrchk: $(HDRCHECKS) 1610Sstevel@tonic-gate 1620Sstevel@tonic-gatecstyle: $(SRCS) 1630Sstevel@tonic-gate $(DOT_C_CHECK) 1640Sstevel@tonic-gate 1650Sstevel@tonic-gateclean: 1660Sstevel@tonic-gate $(RM) $(CLEANFILES) 1670Sstevel@tonic-gate 1680Sstevel@tonic-gatedebug: 1690Sstevel@tonic-gate $(MAKE) all COPTFLAG='' COPTFLAG64='' CFLAGS='-g -DDEBUG' 1700Sstevel@tonic-gate 1710Sstevel@tonic-gate 1720Sstevel@tonic-gate%.o: %.c 1730Sstevel@tonic-gate $(COMPILE.c) $< 1740Sstevel@tonic-gate 1750Sstevel@tonic-gate%.o: ../%.c 1760Sstevel@tonic-gate $(COMPILE.c) $< 1770Sstevel@tonic-gate 1780Sstevel@tonic-gate 1790Sstevel@tonic-gate 1800Sstevel@tonic-gate# install rule 1810Sstevel@tonic-gate# 1820Sstevel@tonic-gate$(ROOTDIRS32)/%: $(ROOTDIRS32) % 1830Sstevel@tonic-gate -$(INS.file) 1840Sstevel@tonic-gate 1850Sstevel@tonic-gate$(ROOTDIRS64)/%: $(ROOTDIRS64) % 1860Sstevel@tonic-gate -$(INS.file) 1870Sstevel@tonic-gate 1880Sstevel@tonic-gate$(ROOTDIRS32): $(ROOTLIB) 1890Sstevel@tonic-gate -$(INS.dir) 1900Sstevel@tonic-gate 1910Sstevel@tonic-gate$(ROOTDIRS64): $(ROOTDIRS32) 1920Sstevel@tonic-gate -$(INS.dir) 1930Sstevel@tonic-gate 1940Sstevel@tonic-gate$(ROOTLIB) $(ROOTBIN): 1950Sstevel@tonic-gate -$(INS.dir) 1960Sstevel@tonic-gate 1970Sstevel@tonic-gateinclude ../../Makefile.targ 1980Sstevel@tonic-gate 199