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