xref: /titanic_41/usr/src/cmd/geniconvtbl/samples/Makefile (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate#
2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate#
4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate# with the License.
8*7c478bd9Sstevel@tonic-gate#
9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate# and limitations under the License.
13*7c478bd9Sstevel@tonic-gate#
14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate#
20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate#
22*7c478bd9Sstevel@tonic-gate# Copyright 1999, 2003 Sun Microsystems, Inc.
23*7c478bd9Sstevel@tonic-gate# All rights reserved.
24*7c478bd9Sstevel@tonic-gate# Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate#
26*7c478bd9Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
27*7c478bd9Sstevel@tonic-gate#
28*7c478bd9Sstevel@tonic-gate# cmd/geniconvtbl/samples/Makefile
29*7c478bd9Sstevel@tonic-gate
30*7c478bd9Sstevel@tonic-gate
31*7c478bd9Sstevel@tonic-gateINPUTFILES = ISO8859-1_to_UTF-8.src UTF-8_to_ISO8859-1.src\
32*7c478bd9Sstevel@tonic-gate		eucJP_to_ISO-2022-JP.src ISO-2022-JP_to_eucJP.src \
33*7c478bd9Sstevel@tonic-gate		ISO646_to_ISO8859-1.src ISO8859-1_to_ISO646.src
34*7c478bd9Sstevel@tonic-gate
35*7c478bd9Sstevel@tonic-gateOUTPUTFILES	= ISO646%ISO8859-1.bt ISO8859-1%ISO646.bt
36*7c478bd9Sstevel@tonic-gate# ONLY TWO binarytables are deribalables
37*7c478bd9Sstevel@tonic-gate
38*7c478bd9Sstevel@tonic-gate#		ISO8859-1%UTF-8.bt UTF-8%ISO8859-1.bt
39*7c478bd9Sstevel@tonic-gate#		eucJP%ISO-2022-JP.bt ISO-2022-JP%eucJP.bt \
40*7c478bd9Sstevel@tonic-gate#		ISO646%ISO8859-1.bt ISO8859-1%ISO646.bt
41*7c478bd9Sstevel@tonic-gate# OUTPUTFILES	= $(INPUTFILES:%.src=%.bt)   NEVER USE ( WATCH OUT FILE NAME )
42*7c478bd9Sstevel@tonic-gate
43*7c478bd9Sstevel@tonic-gate
44*7c478bd9Sstevel@tonic-gateGENICONVTBL= ../$(MACH)/geniconvtbl.native
45*7c478bd9Sstevel@tonic-gate
46*7c478bd9Sstevel@tonic-gate
47*7c478bd9Sstevel@tonic-gate# include ../../../lib/Makefile.lib
48*7c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd
49*7c478bd9Sstevel@tonic-gate
50*7c478bd9Sstevel@tonic-gate
51*7c478bd9Sstevel@tonic-gateROOTICONVDIRS	=	$(ROOTLIB)/iconv
52*7c478bd9Sstevel@tonic-gateROOTDIRS	=	$(ROOTICONVDIRS)/geniconvtbl
53*7c478bd9Sstevel@tonic-gateSRCSDIRS	=	$(ROOTDIRS)/srcs
54*7c478bd9Sstevel@tonic-gateBTSDIRS		=	$(ROOTDIRS)/binarytables
55*7c478bd9Sstevel@tonic-gateROOTINPUTFILES	=	$(INPUTFILES:%=$(SRCSDIRS)/%)
56*7c478bd9Sstevel@tonic-gateROOTOUTPUTFILES =	$(OUTPUTFILES:%=$(BTSDIRS)/%)
57*7c478bd9Sstevel@tonic-gate
58*7c478bd9Sstevel@tonic-gate$(ROOTINPUTFILES) :=	FILEMODE = 444
59*7c478bd9Sstevel@tonic-gate$(ROOTOUTPUTFILES) :=	FILEMODE = 444
60*7c478bd9Sstevel@tonic-gate
61*7c478bd9Sstevel@tonic-gate
62*7c478bd9Sstevel@tonic-gate.KEEP_STATE:
63*7c478bd9Sstevel@tonic-gate
64*7c478bd9Sstevel@tonic-gate.PARALLEL: $(OUTPUTFILES)
65*7c478bd9Sstevel@tonic-gate
66*7c478bd9Sstevel@tonic-gate
67*7c478bd9Sstevel@tonic-gateall:	$(OUTPUTFILES)
68*7c478bd9Sstevel@tonic-gate
69*7c478bd9Sstevel@tonic-gateinstall: all $(ROOTOUTPUTFILES) $(ROOTINPUTFILES)
70*7c478bd9Sstevel@tonic-gate
71*7c478bd9Sstevel@tonic-gateclean clobber:
72*7c478bd9Sstevel@tonic-gate	$(RM) $(OUTPUTFILES)
73*7c478bd9Sstevel@tonic-gate
74*7c478bd9Sstevel@tonic-gate
75*7c478bd9Sstevel@tonic-gateISO8859-1%UTF-8.bt: ISO8859-1_to_UTF-8.src
76*7c478bd9Sstevel@tonic-gate	$(GENICONVTBL) -o $@ -f ISO8859-1_to_UTF-8.src
77*7c478bd9Sstevel@tonic-gate
78*7c478bd9Sstevel@tonic-gateUTF-8%ISO8859_1.bt: UTF-8_to_ISO8859_1.src
79*7c478bd9Sstevel@tonic-gate	$(GENICONVTBL) -o $@ -f UTF-8_to_ISO8859_1.src
80*7c478bd9Sstevel@tonic-gate
81*7c478bd9Sstevel@tonic-gateeucJP%ISO-2022-JP.bt: eucJP_to_ISO-2022-JP.src
82*7c478bd9Sstevel@tonic-gate	$(GENICONVTBL) -o $@ -f eucJP_to_ISO-2022-JP.src
83*7c478bd9Sstevel@tonic-gate
84*7c478bd9Sstevel@tonic-gateISO-2022-JP%eucJP.bt: ISO-2022-JP_to_eucJP.src
85*7c478bd9Sstevel@tonic-gate	$(GENICONVTBL) -o $@ -f ISO-2022-JP_to_eucJP.src
86*7c478bd9Sstevel@tonic-gate
87*7c478bd9Sstevel@tonic-gateISO646%ISO8859-1.bt: ISO646_to_ISO8859-1.src
88*7c478bd9Sstevel@tonic-gate	$(GENICONVTBL) -o $@ -f ISO646_to_ISO8859-1.src
89*7c478bd9Sstevel@tonic-gate
90*7c478bd9Sstevel@tonic-gateISO8859-1%ISO646.bt: ISO8859-1_to_ISO646.src
91*7c478bd9Sstevel@tonic-gate	$(GENICONVTBL) -o $@ -f ISO8859-1_to_ISO646.src
92*7c478bd9Sstevel@tonic-gate
93*7c478bd9Sstevel@tonic-gate
94*7c478bd9Sstevel@tonic-gate# install rule
95*7c478bd9Sstevel@tonic-gate#
96*7c478bd9Sstevel@tonic-gate$(SRCSDIRS)/%: % $(SRCSDIRS)
97*7c478bd9Sstevel@tonic-gate	$(INS.file)
98*7c478bd9Sstevel@tonic-gate
99*7c478bd9Sstevel@tonic-gate$(BTSDIRS)/%: % $(BTSDIRS)
100*7c478bd9Sstevel@tonic-gate	$(INS.file)
101*7c478bd9Sstevel@tonic-gate
102*7c478bd9Sstevel@tonic-gate$(SRCSDIRS) $(BTSDIRS): $(ROOTDIRS)
103*7c478bd9Sstevel@tonic-gate	$(INS.dir)
104*7c478bd9Sstevel@tonic-gate
105*7c478bd9Sstevel@tonic-gate$(ROOTDIRS): $(ROOTICONVDIRS)
106*7c478bd9Sstevel@tonic-gate	$(INS.dir)
107*7c478bd9Sstevel@tonic-gate
108*7c478bd9Sstevel@tonic-gate$(ROOTICONVDIRS):
109*7c478bd9Sstevel@tonic-gate	$(INS.dir)
110*7c478bd9Sstevel@tonic-gate
111*7c478bd9Sstevel@tonic-gate$(SRCSDIRS)/%: $(SRCSDIRS) %
112*7c478bd9Sstevel@tonic-gate	$(INS.file)
113*7c478bd9Sstevel@tonic-gate
114*7c478bd9Sstevel@tonic-gate$(BTSDIRS)/%: $(BTSDIRS) %
115*7c478bd9Sstevel@tonic-gate	$(INS.file)
116*7c478bd9Sstevel@tonic-gate
117*7c478bd9Sstevel@tonic-gate# rule of making BinaryTable
118*7c478bd9Sstevel@tonic-gate# ( must be placed after install rule )
119*7c478bd9Sstevel@tonic-gate#
120*7c478bd9Sstevel@tonic-gate# .SUFFIXES: $(SUFFIXES) .src
121*7c478bd9Sstevel@tonic-gate# .SUFFIXES: $(SUFFIXES) .bt
122*7c478bd9Sstevel@tonic-gate
123*7c478bd9Sstevel@tonic-gate#
124*7c478bd9Sstevel@tonic-gate# %.bt:	%.src
125*7c478bd9Sstevel@tonic-gate#	$(GENICONVTBL) -o $@ -f $<
126*7c478bd9Sstevel@tonic-gate
127*7c478bd9Sstevel@tonic-gate#   include ../../Makefile.targ
128