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
44 SRCSH = $(SRCSH1:%.h=../%.h)
45 SRCCH = $(SRCCH1:%.h=../%.h)
46 SRCSC = $(SRCSC1:%.c=../%.c)
47 SRCI = $(SRCI1:%.c=../%.c)
48 SRCY = $(SRCY1:%.y=../%.y)
49 SRCL = $(SRCL1:%.l=../%.l)
51 SRCYC = $(SRCY:%.y=%.c)
52 SRCLC = $(SRCL:%.l=%.c)
54 SRCS = $(SRCSC) $(YTABC) $(LEXYY)
55 HDRS = $(SRCCH1) $(ERNOSTRH)
61 # include ../../../lib/Makefile.lib
62 include ../../Makefile.cmd
65 ROOTDIRS32= $(ROOTLIB)/iconv
66 ROOTDIRS64= $(ROOTLIB)/iconv/$(MACH64)
67 ROOTITM32 = $(ROOTDIRS32)/$(ITM)
68 ROOTITM64 = $(ROOTDIRS64)/$(ITM)
71 # definition for some useful target like clean,
72 OBJS = $(SRCSC1:%.c=%.o) $(YTABC:.c=.o) $(LEXYY:.c=.o)
74 CHECKHDRS = $(HDRS%.h=%.check)
76 CLOBBERFILES= $(ITM) $(SRCYC)
77 CLEANFILES = $(OBJS) $(YTABC) $(YTABH) $(LEXYY) $(YOUT) \
81 CERRWARN += -Wno-uninitialized
82 CERRWARN += -Wno-unused-label
83 CERRWARN += -Wno-switch
84 CERRWARN += -Wno-unused-variable
85 CERRWARN += -Wno-implicit-function-declaration
87 CFLAGS += -D_FILE_OFFSET_BITS=64
89 $(ITM) := CFLAGS += $(GSHARED) $(C_PICFLAGS) $(ZTEXT) -h $@
90 $(ITM) := sparc_CFLAGS += -mno-app-regs
91 $(ITM) := sparcv9_CFLAGS += -mno-app-regs
95 MY_NATIVE_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -I. -I..
96 MY_NATIVE_LDFLAGS = $(MAPFILE.PGA:%=-Wl,-M%)
97 MY_NATIVE_LDLIBS = -lgen
102 POFILES= $(SRCSC1:%.c=%.po) $(SRCI1:%.c=%.po) \
103 $(SRCY1:%.y=%.po) $(SRCL1:%.l=%.po)
105 POFILE= geniconvtbl_.po
109 .PARALLEL: $(ITM) $(OBJS)
112 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
116 $(CC) $(CFLAGS) $(CPPFLAGS) -Wl,-M$(MAPFILE) -o $@ $(SRCI) $(LDLIBS)
119 $(YTABC) $(YTABH): $(SRCY)
120 $(YACC) $(YFLAGS) $(SRCY)
121 @ $(MV) $(YTABC) $(YTABC)~
122 @ $(SED) -f $(YACCSED) $(YTABC)~ > $(YTABC)
125 $(LEXYY): $(SRCL) $(YTABH)
126 $(LEX) -t $(SRCL) | $(SED) -f $(LEXSED) > $(LEXYY)
129 $(POFILE): .WAIT $(POFILES)
131 $(CAT) $(POFILES) >$@
133 $(POFILES): $(SRCSC) $(SRCI) $(SRCY) $(SRCL)
136 $(COMPILE.cpp) $< > $<.i
148 $(MAKE) all COPTFLAG='' COPTFLAG64='' CFLAGS='-g -DDEBUG'
159 $(ROOTDIRS32)/%: $(ROOTDIRS32) %
162 $(ROOTDIRS64)/%: $(ROOTDIRS64) %
165 $(ROOTDIRS32): $(ROOTLIB)
168 $(ROOTDIRS64): $(ROOTDIRS32)
171 $(ROOTLIB) $(ROOTBIN):
174 include ../../Makefile.targ