xref: /titanic_41/usr/src/cmd/geniconvtbl/samples/Makefile (revision 70025d765b044c6d8594bb965a2247a61e991a99)
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# Copyright 1999, 2003 Sun Microsystems, Inc.
23# All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/geniconvtbl/samples/Makefile
29
30
31INPUTFILES = ISO8859-1_to_UTF-8.src UTF-8_to_ISO8859-1.src\
32		eucJP_to_ISO-2022-JP.src ISO-2022-JP_to_eucJP.src \
33		ISO646_to_ISO8859-1.src ISO8859-1_to_ISO646.src
34
35OUTPUTFILES	= ISO646%ISO8859-1.bt ISO8859-1%ISO646.bt
36# ONLY TWO binarytables are deribalables
37
38#		ISO8859-1%UTF-8.bt UTF-8%ISO8859-1.bt
39#		eucJP%ISO-2022-JP.bt ISO-2022-JP%eucJP.bt \
40#		ISO646%ISO8859-1.bt ISO8859-1%ISO646.bt
41# OUTPUTFILES	= $(INPUTFILES:%.src=%.bt)   NEVER USE ( WATCH OUT FILE NAME )
42
43
44GENICONVTBL= ../$(MACH)/geniconvtbl.native
45
46
47# include ../../../lib/Makefile.lib
48include ../../Makefile.cmd
49
50
51ROOTICONVDIRS	=	$(ROOTLIB)/iconv
52ROOTDIRS	=	$(ROOTICONVDIRS)/geniconvtbl
53SRCSDIRS	=	$(ROOTDIRS)/srcs
54BTSDIRS		=	$(ROOTDIRS)/binarytables
55ROOTINPUTFILES	=	$(INPUTFILES:%=$(SRCSDIRS)/%)
56ROOTOUTPUTFILES =	$(OUTPUTFILES:%=$(BTSDIRS)/%)
57
58$(ROOTINPUTFILES) :=	FILEMODE = 444
59$(ROOTOUTPUTFILES) :=	FILEMODE = 444
60
61
62.KEEP_STATE:
63
64.PARALLEL: $(OUTPUTFILES)
65
66
67all:	$(OUTPUTFILES)
68
69install: all $(ROOTOUTPUTFILES) $(ROOTINPUTFILES)
70
71clean clobber:
72	$(RM) $(OUTPUTFILES)
73
74
75ISO8859-1%UTF-8.bt: ISO8859-1_to_UTF-8.src
76	$(GENICONVTBL) -o $@ -f ISO8859-1_to_UTF-8.src
77
78UTF-8%ISO8859_1.bt: UTF-8_to_ISO8859_1.src
79	$(GENICONVTBL) -o $@ -f UTF-8_to_ISO8859_1.src
80
81eucJP%ISO-2022-JP.bt: eucJP_to_ISO-2022-JP.src
82	$(GENICONVTBL) -o $@ -f eucJP_to_ISO-2022-JP.src
83
84ISO-2022-JP%eucJP.bt: ISO-2022-JP_to_eucJP.src
85	$(GENICONVTBL) -o $@ -f ISO-2022-JP_to_eucJP.src
86
87ISO646%ISO8859-1.bt: ISO646_to_ISO8859-1.src
88	$(GENICONVTBL) -o $@ -f ISO646_to_ISO8859-1.src
89
90ISO8859-1%ISO646.bt: ISO8859-1_to_ISO646.src
91	$(GENICONVTBL) -o $@ -f ISO8859-1_to_ISO646.src
92
93
94# install rule
95#
96$(SRCSDIRS)/%: % $(SRCSDIRS)
97	$(INS.file)
98
99$(BTSDIRS)/%: % $(BTSDIRS)
100	$(INS.file)
101
102$(SRCSDIRS) $(BTSDIRS): $(ROOTDIRS)
103	$(INS.dir)
104
105$(ROOTDIRS): $(ROOTICONVDIRS)
106	$(INS.dir)
107
108$(ROOTICONVDIRS):
109	$(INS.dir)
110
111$(SRCSDIRS)/%: $(SRCSDIRS) %
112	$(INS.file)
113
114$(BTSDIRS)/%: $(BTSDIRS) %
115	$(INS.file)
116
117# rule of making BinaryTable
118# ( must be placed after install rule )
119#
120# .SUFFIXES: $(SUFFIXES) .src
121# .SUFFIXES: $(SUFFIXES) .bt
122
123#
124# %.bt:	%.src
125#	$(GENICONVTBL) -o $@ -f $<
126
127#   include ../../Makefile.targ
128