Merge commit '8fd2e913f04a71b9e820a088819d5b3d5205945b'
[unleashed.git] / usr / src / cmd / iconv / Makefile
blob2aecbfcf860c7b0f20ddadcb144bacb1e6bc48d7
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.
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.
13 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
14 # Copyright 2017 Joyent Inc.
17 PROG=iconv
19 include ../Makefile.cmd
20 include ../Makefile.ctf
22 OBJS = iconv_main.o iconv_list.o charmap.o parser.tab.o scanner.o
24 SRCS = $(OBJS:%.o=%.c)
26 C99MODE= $(C99_ENABLE)
27 LDLIBS += -lcmdutils -lavl
28 YFLAGS = -d -b parser
29 CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
30 $(RELEASE_BUILD) CPPFLAGS += -DNDEBUG
32 CERRWARN += -Wno-unused-label
34 CLEANFILES = $(OBJS) parser.tab.c parser.tab.h
35 CLOBBERFILES = $(PROG) $(POFILE)
36 PIFILES = $(OBJS:%.o=%.i)
37 POFILE = iconv_cmd.po
39 all: $(PROG)
41 install: all $(ROOTPROG)
43 $(PROG): $(OBJS)
44 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
45 $(POST_PROCESS)
47 $(OBJS): parser.tab.h
48 $(PIFILES): parser.tab.h
50 parser.tab.c parser.tab.h: parser.y
51 $(YACC) $(YFLAGS) parser.y
53 clean:
54 $(RM) $(CLEANFILES)
56 $(POFILE): $(PIFILES)
57 $(RM) $@
58 $(RM) messages.po
59 $(XGETTEXT) -s $(PIFILES)
60 $(SED) -e '/domain/d' messages.po > $@
61 $(RM) $(PIFILES) messages.po
63 .KEEP_STATE:
65 include ../Makefile.targ