xref: /titanic_41/usr/src/lib/libxcurses/Makefile (revision fd9cb95cbb2f626355a60efb9d02c5f0a33c10e6)
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
53
54# extra clean-up work
55CLOBBERFILES=	$(GENERATED)
56
57.KEEP_STATE:
58
59LIBS=		$(DYNLIB) $(LINTLIB)
60
61all: $(GENERATED) .WAIT $(SUBDIRS)
62
63install: all .WAIT $(SUBDIRS)
64
65clean clobber: $(SUBDIRS)
66	$(RM) $(GENERATED)
67
68lint: $(SUBDIRS)
69
70# still need to implement cstyle check of term.h
71# do this when we go through and make this library cstyle clean.
72check: $(HDRS)
73
74$(MACH) $(MACH64) spec: $(GENERATED)
75	@cd $@; pwd; $(MAKE) $(TARGET)
76
77# derived C files
78# mknames.awk defines functions so needs nawk
79$(NAMES) : src/libc/xcurses/mknames.awk src/libc/xcurses/caps
80	$(RM) $(NAMES)
81	cd src/libc/xcurses; nawk -f mknames.awk caps
82
83h/term.h : src/libc/xcurses/mkterm.awk src/libc/xcurses/caps
84	$(RM) $@
85	cd src/libc/xcurses; awk -f mkterm.awk caps > term.h
86	$(MV) src/libc/xcurses/term.h h/term.h
87
88src/libc/xcurses/keyindex.c : src/libc/xcurses/mkkey.awk src/libc/xcurses/caps
89	$(RM) $@
90	cd src/libc/xcurses; nawk -f mkkey.awk caps > keyindex.c
91
92FRC:
93