build: remove map.noexstk and map.noexdata (now default)
[unleashed.git] / usr / src / lib / libcurses / Makefile
blobb672381ece26d5e6fa4537f8ac43718574136947
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 test := TARGET= test
38 SCRFILES = screen/keycaps \
39 screen/curses.h \
40 screen/keyname.c \
41 screen/termcap.c \
42 screen/tifget.c \
43 screen/tiget.c \
44 screen/tifnames.c \
45 screen/tnames.c \
46 screen/tinames.c \
47 screen/term.h
49 # definitions for install_h target
50 HDRS= curses.h term.h unctrl.h
51 HDRDIR= screen
53 LIBRARY= libcurses.a
54 TEXT_DOMAIN= SUNW_OST_OSLIB
55 XGETFLAGS= -a
56 MSGDIRS= screen
57 POFILE= $(LIBRARY:.a=.po)
58 POFILES= generic.po
59 CLEANFILES += $(SCRFILES)
61 # term.h doesn't pass cstyle due to numerous lines exceeding the 80 character
62 # limit. maketerm.ed can probably be fixed to prevent this, but it is arguable
63 # if this work would ever be worth it.
65 screen/term.check := CSTYLE_TAIL = | grep -v "line > 80 characters" | true
67 .KEEP_STATE:
69 all: $(SCRFILES) .WAIT $(SUBDIRS)
71 install: all .WAIT $(SUBDIRS)
73 clean clobber test: $(SUBDIRS)
75 install_h: $(ROOTHDRS)
77 check: $(CHECKHDRS)
79 scrfiles: $(SCRFILES)
81 $(SUBDIRS): FRC
82 @cd $@; pwd; $(MAKE) $(TARGET)
84 ED = ed
86 screen/curses.h: screen/curses.ed screen/keycaps screen/tmp
87 (cd screen; $(ED) - < curses.ed)
89 screen/keycaps: screen/caps
90 grep "KEY_" screen/caps > screen/keycaps
91 @if tail -1 screen/keycaps | grep 'KEY_MOUSE' > /dev/null;then :; \
92 else echo new keys!! must change setkeymap.c; exit 1;fi
94 screen/keyname.c: screen/keyname.sh screen/keycaps
95 (cd screen; sh keyname.sh)
97 screen/termcap.c: screen/termcap.ed
98 (cd screen; $(ED) - < termcap.ed)
99 (cd screen; $(RM) bool num str)
101 screen/tifget.c: screen/tifget.ed
102 (cd screen; $(ED) - < tifget.ed)
104 screen/tiget.c: screen/tiget.ed
105 (cd screen; $(ED) - < tiget.ed)
107 screen/tnames.c screen/tinames.c screen/tifnames.c \
108 screen/term.h: screen/maketerm.ed
109 (cd screen; $(ED) - < maketerm.ed)
111 screen/tmp:
112 rm -rf $@
113 mkdir $@
115 CLEANFILES += \
116 screen/tmp/keycaps \
117 screen/tmp/term.h.new1 \
118 screen/tmp/term.h.new2
120 _msg: $(MSGDOMAIN) .WAIT $(POFILE)
121 $(RM) $(MSGDOMAIN)/$(POFILE)
122 $(CP) $(POFILE) $(MSGDOMAIN)
124 $(POFILE): $(POFILES)
125 $(RM) $@
126 $(CAT) $(POFILES) > $@
128 generic.po:
129 $(RM) messages.po
130 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]* */*.[ch]*`
131 $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
132 $(RM) messages.po
134 FRC:
136 include ../Makefile.targ