1 # 2 # This file and its contents are supplied under the terms of the 3 # Common Development and Distribution License ("CDDL"), version 1.0. 4 # You may only use this file in accordance with the terms of version 5 # 1.0 of the CDDL. 6 # 7 # A full copy of the text of the CDDL should have accompanied this 8 # source. A copy of the CDDL is also available via the Internet at 9 # http://www.illumos.org/license/CDDL. 10 # 11 12 # 13 # Copyright 2011 Nexenta Systems, Inc. All rights reserved. 14 # 15 16 PROG=iconv 17 SHFILES=iconv_list 18 19 include ../Makefile.cmd 20 21 OBJS = iconv.o charmap.o parser.tab.o scanner.o 22 23 SRCS = $(OBJS:%.o=%.c) 24 25 C99MODE= $(C99_ENABLE) 26 LDLIBS += -lgen 27 LDLIBS += -lavl 28 YFLAGS = -d -b parser 29 $(RELEASE_BUILD) CPPFLAGS += -DNDEBUG 30 31 CLEANFILES = $(OBJS) parser.tab.c parser.tab.h 32 CLOBBERFILES = $(PROG) $(POFILE) 33 PIFILES = $(OBJS:%.o=%.i) 34 POFILE = iconv_cmd.po 35 36 all: $(PROG) $(SHFILES) 37 38 ROOTLIBICONV = $(ROOT)/usr/lib/iconv 39 ROOTLIBICONVSH = $(SHFILES:%=$(ROOTLIBICONV)/%) 40 $(ROOTLIBICONVSH) := FILEMODE = 0555 41 42 install: all $(ROOTPROG) $(ROOTLIBICONV) $(ROOTLIBICONVSH) 43 44 $(PROG): $(OBJS) 45 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 46 $(POST_PROCESS) 47 48 $(OBJS): parser.tab.h 49 50 parser.tab.c parser.tab.h: parser.y 51 $(YACC) $(YFLAGS) parser.y 52 53 lint: $(SRCS) 54 $(LINT.c) $(CPPFLAGS) $(SRCS) 55 56 clean: 57 $(RM) $(CLEANFILES) 58 59 $(POFILE): $(PIFILES) 60 $(RM) $@ 61 $(RM) messages.po 62 $(XGETTEXT) -s $(PIFILES) 63 $(SED) -e '/domain/d' messages.po > $@ 64 $(RM) $(PIFILES) messages.po 65 66 $(ROOTLIBICONV): 67 $(INS.dir) 68 69 $(ROOTLIBICONV)/%: % 70 $(INS.file) 71 72 .KEEP_STATE: 73 74 include ../Makefile.targ