8982 Support building with OpenSSL 1.1
[unleashed.git] / usr / src / lib / libcurses / Makefile
blob9e88e23114849970a7c7c0fc1a24cd5ed52bb9a7
2 # CDDL HEADER START
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]
19 # CDDL HEADER END
22 # Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
26 include ../Makefile.lib
28 SUBDIRS = $(MACH)
29 $(BUILD64)SUBDIRS += $(MACH64)
31 # conditional assignments
32 all := TARGET= all
33 install := TARGET= install
34 clean := TARGET= clean
35 clobber := TARGET= clobber
36 lint := TARGET= lint
37 test := TARGET= test
39 SCRFILES = screen/keycaps \
40 screen/curses.h \
41 screen/keyname.c \
42 screen/termcap.c \
43 screen/tifget.c \
44 screen/tiget.c \
45 screen/tifnames.c \
46 screen/tnames.c \
47 screen/tinames.c \
48 screen/term.h
50 # definitions for install_h target
51 HDRS= curses.h term.h unctrl.h
52 HDRDIR= screen
54 LIBRARY= libcurses.a
55 TEXT_DOMAIN= SUNW_OST_OSLIB
56 XGETFLAGS= -a
57 MSGDIRS= screen
58 POFILE= $(LIBRARY:.a=.po)
59 POFILES= generic.po
60 CLEANFILES += $(SCRFILES)
62 # term.h doesn't pass cstyle due to numerous lines exceeding the 80 character
63 # limit. maketerm.ed can probably be fixed to prevent this, but it is arguable
64 # if this work would ever be worth it.
66 screen/term.check := CSTYLE_TAIL = | grep -v "line > 80 characters" | true
68 .KEEP_STATE:
70 all: $(SCRFILES) .WAIT $(SUBDIRS)
72 install: all .WAIT $(SUBDIRS)
74 clean clobber lint test: $(SUBDIRS)
76 install_h: $(ROOTHDRS)
78 check: $(CHECKHDRS)
80 scrfiles: $(SCRFILES)
82 $(SUBDIRS): FRC
83 @cd $@; pwd; $(MAKE) $(TARGET)
85 ED = ed
87 screen/curses.h: screen/curses.ed screen/keycaps screen/tmp
88 (cd screen; $(ED) - < curses.ed)
90 screen/keycaps: screen/caps
91 grep "KEY_" screen/caps > screen/keycaps
92 @if tail -1 screen/keycaps | grep 'KEY_MOUSE' > /dev/null;then :; \
93 else echo new keys!! must change setkeymap.c; exit 1;fi
95 screen/keyname.c: screen/keyname.sh screen/keycaps
96 (cd screen; sh keyname.sh)
98 screen/termcap.c: screen/termcap.ed
99 (cd screen; $(ED) - < termcap.ed)
100 (cd screen; $(RM) bool num str)
102 screen/tifget.c: screen/tifget.ed
103 (cd screen; $(ED) - < tifget.ed)
105 screen/tiget.c: screen/tiget.ed
106 (cd screen; $(ED) - < tiget.ed)
108 screen/tnames.c screen/tinames.c screen/tifnames.c \
109 screen/term.h: screen/maketerm.ed
110 (cd screen; $(ED) - < maketerm.ed)
112 screen/tmp:
113 rm -rf $@
114 mkdir $@
116 CLEANFILES += \
117 screen/tmp/keycaps \
118 screen/tmp/term.h.new1 \
119 screen/tmp/term.h.new2
121 _msg: $(MSGDOMAIN) .WAIT $(POFILE)
122 $(RM) $(MSGDOMAIN)/$(POFILE)
123 $(CP) $(POFILE) $(MSGDOMAIN)
125 $(POFILE): $(POFILES)
126 $(RM) $@
127 $(CAT) $(POFILES) > $@
129 generic.po:
130 $(RM) messages.po
131 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]* */*.[ch]*`
132 $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
133 $(RM) messages.po
135 FRC:
137 include ../Makefile.targ