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.
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.
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]
21 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
22 # Use is subject to license terms.
24 # ident "%Z%%M% %I% %E% SMI"
26 # cmd/geniconvtbl/Makefile.com
28 $(NOT_NATIVE)NATIVE_BUILD = $(POUND_SIGN)
33 SRCSH1 = iconv_tm.h hash.h
34 SRCCH1 = itmcomp.h itm_util.h maptype.h
35 SRCSC1 = itmcomp.c assemble.c disassemble.c itm_util.c
49 SRCSH = $(SRCSH1:%.h=../%.h)
50 SRCCH = $(SRCCH1:%.h=../%.h)
51 SRCSC = $(SRCSC1:%.c=../%.c)
52 SRCI = $(SRCI1:%.c=../%.c)
53 SRCY = $(SRCY1:%.y=../%.y)
54 SRCL = $(SRCL1:%.l=../%.l)
56 SRCYC = $(SRCY:%.y=%.c)
57 SRCLC = $(SRCL:%.l=%.c)
59 SRCS = $(SRCSC) $(YTABC) $(LEXYY)
60 HDRS = $(SRCCH1) $(ERNOSTRH)
70 # include ../../../lib/Makefile.lib
71 include ../../Makefile.cmd
74 ROOTDIRS32= $(ROOTLIB)/iconv
75 ROOTDIRS64= $(ROOTLIB)/iconv/$(MACH64)
76 ROOTITM32 = $(ROOTDIRS32)/$(ITM)
77 ROOTITM64 = $(ROOTDIRS64)/$(ITM)
80 # definition for some useful target like clean,
81 OBJS = $(SRCSC1:%.c=%.o) $(YTABC:.c=.o) $(LEXYY:.c=.o)
83 CHECKHDRS = $(HDRS%.h=%.check)
86 CLEANFILES = $(OBJS) $(YTABC) $(YTABH) $(LEXYY) $(YOUT) \
91 CFLAGS += -D_FILE_OFFSET_BITS=64
93 $(ITM) := CFLAGS += $(GSHARED) $(C_PICFLAGS) $(ZTEXT) -h $@
94 $(ITM) := CPPFLAGS += -D_REENTRANT
95 $(ITM) := sparc_CFLAGS += -xregs=no%appl
96 $(ITM) := sparcv9_CFLAGS += -xregs=no%appl
100 MY_NATIVE_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -I. -I..
101 MY_NATIVE_LDFLAGS = $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
102 MY_NATIVE_LDLIBS = -lgen
107 POFILES= $(SRCSC1:%.c=%.po) $(SRCI1:%.c=%.po) \
108 $(SRCY1:%.y=%.po) $(SRCL1:%.l=%.po)
110 POFILE= geniconvtbl_.po
118 .PARALLEL: $(ITM) $(OBJS)
121 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
125 $(CC) $(CFLAGS) $(CPPFLAGS) -M$(MAPFILE) -o $@ $(SRCI) $(LDLIBS)
128 $(YTABC) $(YTABH): $(SRCY)
129 $(YACC) $(YFLAGS) $(SRCY)
130 @ $(MV) $(YTABC) $(YTABC)~
131 @ $(SED) -f $(YACCSED) $(YTABC)~ > $(YTABC)
134 $(LEXYY): $(SRCL) $(YTABH)
135 $(LEX) -t $(SRCL) | $(SED) -f $(LEXSED) > $(LEXYY)
138 $(POFILE): .WAIT $(POFILES)
140 $(CAT) $(POFILES) >$@
142 $(POFILES): $(SRCSC) $(SRCI) $(SRCY) $(SRCL)
145 $(COMPILE.cpp) $< > $<.i
149 lint : lint_SRCS1 lint_SRCS2
153 $(LINT.c) $(SRCS) $(LDLIBS)
156 $(LINT.c) $(SRCI) $(LDLIBS)
169 $(MAKE) all COPTFLAG='' COPTFLAG64='' CFLAGS='-g -DDEBUG'
182 $(ROOTDIRS32)/%: $(ROOTDIRS32) %
185 $(ROOTDIRS64)/%: $(ROOTDIRS64) %
188 $(ROOTDIRS32): $(ROOTLIB)
191 $(ROOTDIRS64): $(ROOTDIRS32)
194 $(ROOTLIB) $(ROOTBIN):
197 include ../../Makefile.targ