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