xref: /titanic_41/usr/src/lib/libxcurses2/Makefile (revision 03831d35f7499c87d51205817c93e9a8d42c4bae)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright (c) 1995-1999 by Sun Microsystems, Inc.
24# All rights reserved.
25#
26#pragma ident	"%Z%%M%	%I%	%E% SMI"
27#
28# lib/libxcurses/Makefile
29
30include	../Makefile.lib
31
32SUBDIRS = spec .WAIT $(MACH) $(BUILD64) $(MACH64)
33
34all :=		TARGET= all
35install :=	TARGET= install
36clean :=	TARGET= clean
37clobber :=	TARGET= clobber
38lint :=		TARGET= lint
39
40# capability NAMES generated source
41NAMES= \
42src/libc/xcurses/boolcode.c	src/libc/xcurses/boolfnam.c \
43src/libc/xcurses/boolname.c	src/libc/xcurses/numcode.c \
44src/libc/xcurses/numfnam.c	src/libc/xcurses/numname.c \
45src/libc/xcurses/strcode.c	src/libc/xcurses/strfnam.c \
46src/libc/xcurses/strname.c
47
48GENERATED= \
49$(NAMES)	src/libc/xcurses/keyindex.c	h/term.h
50
51# definitions for install_h target
52HDRS=		h/term.h h/curses.h h/unctrl.h
53ROOTHDRDIR=	$(ROOT)/usr/xpg4/include
54ROOTHDRS=	$(HDRS:h/%=$(ROOTHDRDIR)/%)
55
56# install rule for install_h target
57$(ROOTHDRDIR)/%: h/%
58	$(INS.file)
59
60# extra clean-up work
61CLOBBERFILES=	$(GENERATED)
62
63.KEEP_STATE:
64
65LIBS=		$(DYNLIB) $(LINTLIB)
66
67all: $(GENERATED) .WAIT $(SUBDIRS)
68
69install: all .WAIT $(SUBDIRS)
70
71clean clobber: $(SUBDIRS)
72	$(RM) $(GENERATED)
73
74lint: $(SUBDIRS)
75
76# still need to implement cstyle check of term.h
77# do this when we go through and make this library cstyle clean.
78check: $(HDRS)
79
80install_h: $(ROOTHDRS)
81
82$(MACH) $(MACH64) spec: $(GENERATED)
83	@cd $@; pwd; $(MAKE) $(TARGET)
84
85# derived C files
86# mknames.awk defines functions so needs nawk
87$(NAMES) : src/libc/xcurses/mknames.awk src/libc/xcurses/caps
88	$(RM) $(NAMES)
89	cd src/libc/xcurses; nawk -f mknames.awk caps
90
91h/term.h : src/libc/xcurses/mkterm.awk src/libc/xcurses/caps
92	$(RM) $@
93	cd src/libc/xcurses; awk -f mkterm.awk caps > term.h
94	$(MV) src/libc/xcurses/term.h h/term.h
95
96src/libc/xcurses/keyindex.c : src/libc/xcurses/mkkey.awk src/libc/xcurses/caps
97	$(RM) $@
98	cd src/libc/xcurses; nawk -f mkkey.awk caps > keyindex.c
99
100FRC:
101