xref: /onnv-gate/usr/src/lib/libxcurses2/Makefile (revision 2522:79989c8fe091)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*2522Sraf# Common Development and Distribution License (the "License").
6*2522Sraf# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
210Sstevel@tonic-gate#
22*2522Sraf# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23*2522Sraf# Use is subject to license terms.
240Sstevel@tonic-gate#
25*2522Sraf# ident	"%Z%%M%	%I%	%E% SMI"
260Sstevel@tonic-gate#
270Sstevel@tonic-gate
280Sstevel@tonic-gateinclude	../Makefile.lib
290Sstevel@tonic-gate
30*2522SrafSUBDIRS =	$(MACH)
31*2522Sraf$(BUILD64)SUBDIRS += $(MACH64)
320Sstevel@tonic-gate
330Sstevel@tonic-gateall :=		TARGET= all
340Sstevel@tonic-gateinstall :=	TARGET= install
350Sstevel@tonic-gateclean :=	TARGET= clean
360Sstevel@tonic-gateclobber :=	TARGET= clobber
370Sstevel@tonic-gatelint :=		TARGET= lint
380Sstevel@tonic-gate
390Sstevel@tonic-gate# capability NAMES generated source
400Sstevel@tonic-gateNAMES= \
410Sstevel@tonic-gatesrc/libc/xcurses/boolcode.c	src/libc/xcurses/boolfnam.c \
420Sstevel@tonic-gatesrc/libc/xcurses/boolname.c	src/libc/xcurses/numcode.c \
430Sstevel@tonic-gatesrc/libc/xcurses/numfnam.c	src/libc/xcurses/numname.c \
440Sstevel@tonic-gatesrc/libc/xcurses/strcode.c	src/libc/xcurses/strfnam.c \
450Sstevel@tonic-gatesrc/libc/xcurses/strname.c
460Sstevel@tonic-gate
470Sstevel@tonic-gateGENERATED= \
480Sstevel@tonic-gate$(NAMES)	src/libc/xcurses/keyindex.c	h/term.h
490Sstevel@tonic-gate
500Sstevel@tonic-gate# definitions for install_h target
510Sstevel@tonic-gateHDRS=		h/term.h h/curses.h h/unctrl.h
520Sstevel@tonic-gateROOTHDRDIR=	$(ROOT)/usr/xpg4/include
530Sstevel@tonic-gateROOTHDRS=	$(HDRS:h/%=$(ROOTHDRDIR)/%)
540Sstevel@tonic-gate
550Sstevel@tonic-gate# install rule for install_h target
560Sstevel@tonic-gate$(ROOTHDRDIR)/%: h/%
570Sstevel@tonic-gate	$(INS.file)
580Sstevel@tonic-gate
590Sstevel@tonic-gate# extra clean-up work
600Sstevel@tonic-gateCLOBBERFILES=	$(GENERATED)
610Sstevel@tonic-gate
620Sstevel@tonic-gate.KEEP_STATE:
630Sstevel@tonic-gate
640Sstevel@tonic-gateLIBS=		$(DYNLIB) $(LINTLIB)
650Sstevel@tonic-gate
660Sstevel@tonic-gateall: $(GENERATED) .WAIT $(SUBDIRS)
670Sstevel@tonic-gate
680Sstevel@tonic-gateinstall: all .WAIT $(SUBDIRS)
690Sstevel@tonic-gate
700Sstevel@tonic-gateclean clobber: $(SUBDIRS)
710Sstevel@tonic-gate	$(RM) $(GENERATED)
720Sstevel@tonic-gate
730Sstevel@tonic-gatelint: $(SUBDIRS)
740Sstevel@tonic-gate
750Sstevel@tonic-gate# still need to implement cstyle check of term.h
760Sstevel@tonic-gate# do this when we go through and make this library cstyle clean.
770Sstevel@tonic-gatecheck: $(HDRS)
780Sstevel@tonic-gate
790Sstevel@tonic-gateinstall_h: $(ROOTHDRS)
800Sstevel@tonic-gate
81*2522Sraf$(SUBDIRS):	$(GENERATED)
820Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
830Sstevel@tonic-gate
840Sstevel@tonic-gate# derived C files
850Sstevel@tonic-gate# mknames.awk defines functions so needs nawk
860Sstevel@tonic-gate$(NAMES) : src/libc/xcurses/mknames.awk src/libc/xcurses/caps
870Sstevel@tonic-gate	$(RM) $(NAMES)
880Sstevel@tonic-gate	cd src/libc/xcurses; nawk -f mknames.awk caps
890Sstevel@tonic-gate
900Sstevel@tonic-gateh/term.h : src/libc/xcurses/mkterm.awk src/libc/xcurses/caps
910Sstevel@tonic-gate	$(RM) $@
920Sstevel@tonic-gate	cd src/libc/xcurses; awk -f mkterm.awk caps > term.h
930Sstevel@tonic-gate	$(MV) src/libc/xcurses/term.h h/term.h
940Sstevel@tonic-gate
950Sstevel@tonic-gatesrc/libc/xcurses/keyindex.c : src/libc/xcurses/mkkey.awk src/libc/xcurses/caps
960Sstevel@tonic-gate	$(RM) $@
970Sstevel@tonic-gate	cd src/libc/xcurses; nawk -f mkkey.awk caps > keyindex.c
98