Makefile revision 98b227cc3397df563643fb1aaa1fddddd390f8c8
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome#
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# CDDL HEADER START
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome#
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# The contents of this file are subject to the terms of the
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# Common Development and Distribution License (the "License").
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# You may not use this file except in compliance with the License.
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome#
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# or http://www.opensolaris.org/os/licensing.
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# See the License for the specific language governing permissions
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# and limitations under the License.
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome#
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# When distributing Covered Code, include this CDDL HEADER in each
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# If applicable, add the following below this CDDL HEADER, with the
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# fields enclosed by brackets "[]" replaced with your own identifying
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# information: Portions Copyright [yyyy] [name of copyright owner]
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome#
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# CDDL HEADER END
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome#
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome#
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# Use is subject to license terms.
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome#
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soomeinclude ../Makefile.lib
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas SoomeSUBDIRS = $(MACH)
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome$(BUILD64)SUBDIRS += $(MACH64)
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soomeall := TARGET= all
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soomeinstall := TARGET= install
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soomeclean := TARGET= clean
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soomeclobber := TARGET= clobber
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soomelint := TARGET= lint
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# capability NAMES generated source
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas SoomeNAMES= \
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soomesrc/libc/xcurses/boolcode.c src/libc/xcurses/boolfnam.c \
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soomesrc/libc/xcurses/boolname.c src/libc/xcurses/numcode.c \
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soomesrc/libc/xcurses/numfnam.c src/libc/xcurses/numname.c \
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soomesrc/libc/xcurses/strcode.c src/libc/xcurses/strfnam.c \
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soomesrc/libc/xcurses/strname.c
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas SoomeGENERATED= \
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome$(NAMES) src/libc/xcurses/keyindex.c h/term.h
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# definitions for install_h target
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas SoomeHDRS= h/term.h h/curses.h h/unctrl.h
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas SoomeROOTHDRDIR= $(ROOT)/usr/xpg4/include
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas SoomeROOTHDRS= $(HDRS:h/%=$(ROOTHDRDIR)/%)
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# install rule for install_h target
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome$(ROOTHDRDIR)/%: h/%
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome $(INS.file)
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome# extra clean-up work
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas SoomeCLOBBERFILES= $(GENERATED)
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome.KEEP_STATE:
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas SoomeLIBS= $(DYNLIB) $(LINTLIB)
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soomeall: $(GENERATED) .WAIT $(SUBDIRS)
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soomeinstall: all .WAIT $(SUBDIRS)
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome
clean clobber: $(SUBDIRS)
$(RM) $(GENERATED)
lint: $(SUBDIRS)
# still need to implement cstyle check of term.h
# do this when we go through and make this library cstyle clean.
check: $(HDRS)
install_h: $(ROOTHDRS)
$(SUBDIRS): $(GENERATED)
@cd $@; pwd; $(MAKE) $(TARGET)
# derived C files
# mknames.awk defines functions so needs nawk
$(NAMES) : src/libc/xcurses/mknames.awk src/libc/xcurses/caps
$(RM) $(NAMES)
cd src/libc/xcurses; $(NAWK) -f mknames.awk caps
h/term.h : src/libc/xcurses/mkterm.awk src/libc/xcurses/caps
$(RM) $@
cd src/libc/xcurses; $(NAWK) -f mkterm.awk caps > term.h
$(MV) src/libc/xcurses/term.h h/term.h
src/libc/xcurses/keyindex.c : src/libc/xcurses/mkkey.awk src/libc/xcurses/caps
$(RM) $@
cd src/libc/xcurses; $(NAWK) -f mkkey.awk caps > keyindex.c