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.
25 $(NOT_NATIVE)NATIVE_BUILD = $(POUND_SIGN)
30 SRCSH1 = iconv_tm.h hash.h
31 SRCCH1 = itmcomp.h itm_util.h maptype.h
32 SRCSC1 = itmcomp.c assemble.c disassemble.c itm_util.c
46 SRCSH = $(SRCSH1:%.h=../%.h)
47 SRCCH = $(SRCCH1:%.h=../%.h)
48 SRCSC = $(SRCSC1:%.c=../%.c)
49 SRCI = $(SRCI1:%.c=../%.c)
50 SRCY = $(SRCY1:%.y=../%.y)
51 SRCL = $(SRCL1:%.l=../%.l)
53 SRCYC = $(SRCY:%.y=%.c)
54 SRCLC = $(SRCL:%.l=%.c)
56 SRCS = $(SRCSC) $(YTABC) $(LEXYY)
57 HDRS = $(SRCCH1) $(ERNOSTRH)
67 # include ../../../lib/Makefile.lib
68 include ../../Makefile.cmd
71 ROOTDIRS32= $(ROOTLIB)/iconv
72 ROOTDIRS64= $(ROOTLIB)/iconv/$(MACH64)
73 ROOTITM32 = $(ROOTDIRS32)/$(ITM)
74 ROOTITM64 = $(ROOTDIRS64)/$(ITM)
77 # definition for some useful target like clean,
78 OBJS = $(SRCSC1:%.c=%.o) $(YTABC:.c=.o) $(LEXYY:.c=.o)
80 CHECKHDRS = $(HDRS%.h=%.check)
82 CLOBBERFILES= $(ITM) $(SRCYC)
83 CLEANFILES = $(OBJS) $(YTABC) $(YTABH) $(LEXYY) $(YOUT) \
87 CERRWARN += -_gcc=-Wno-uninitialized
88 CERRWARN += -_gcc=-Wno-unused-label
89 CERRWARN += -_gcc=-Wno-switch
90 CERRWARN += -_gcc=-Wno-unused-variable
91 CERRWARN += -_gcc=-Wno-implicit-function-declaration
93 CFLAGS += -D_FILE_OFFSET_BITS=64
95 $(ITM) := CFLAGS += $(GSHARED) $(C_PICFLAGS) $(ZTEXT) -h $@
96 $(ITM) := CPPFLAGS += -D_REENTRANT
97 $(ITM) := sparc_CFLAGS += -xregs=no%appl
98 $(ITM) := sparcv9_CFLAGS += -xregs=no%appl
102 MY_NATIVE_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -I. -I..
103 MY_NATIVE_LDFLAGS = $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
104 MY_NATIVE_LDLIBS = -lgen
109 POFILES= $(SRCSC1:%.c=%.po) $(SRCI1:%.c=%.po) \
110 $(SRCY1:%.y=%.po) $(SRCL1:%.l=%.po)
112 POFILE= geniconvtbl_.po
120 .PARALLEL: $(ITM) $(OBJS)
123 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
127 $(CC) $(CFLAGS) $(CPPFLAGS) -M$(MAPFILE) -o $@ $(SRCI) $(LDLIBS)
130 $(YTABC) $(YTABH): $(SRCY)
131 $(YACC) $(YFLAGS) $(SRCY)
132 @ $(MV) $(YTABC) $(YTABC)~
133 @ $(SED) -f $(YACCSED) $(YTABC)~ > $(YTABC)
136 $(LEXYY): $(SRCL) $(YTABH)
137 $(LEX) -t $(SRCL) | $(SED) -f $(LEXSED) > $(LEXYY)
140 $(POFILE): .WAIT $(POFILES)
142 $(CAT) $(POFILES) >$@
144 $(POFILES): $(SRCSC) $(SRCI) $(SRCY) $(SRCL)
147 $(COMPILE.cpp) $< > $<.i
151 lint : lint_SRCS1 lint_SRCS2
155 $(LINT.c) $(SRCS) $(LDLIBS)
158 $(LINT.c) $(SRCI) $(LDLIBS)
171 $(MAKE) all COPTFLAG='' COPTFLAG64='' CFLAGS='-g -DDEBUG'
184 $(ROOTDIRS32)/%: $(ROOTDIRS32) %
187 $(ROOTDIRS64)/%: $(ROOTDIRS64) %
190 $(ROOTDIRS32): $(ROOTLIB)
193 $(ROOTDIRS64): $(ROOTDIRS32)
196 $(ROOTLIB) $(ROOTBIN):
199 include ../../Makefile.targ