Makefile revision 24fe0b3bf671e123467ce1df0b67cadd3614c8e4
1N/A#
1N/A# CDDL HEADER START
1N/A#
1N/A# The contents of this file are subject to the terms of the
1N/A# Common Development and Distribution License (the "License").
1N/A# You may not use this file except in compliance with the License.
1N/A#
1N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1N/A# or http://www.opensolaris.org/os/licensing.
1N/A# See the License for the specific language governing permissions
1N/A# and limitations under the License.
1N/A#
1N/A# When distributing Covered Code, include this CDDL HEADER in each
1N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1N/A# If applicable, add the following below this CDDL HEADER, with the
1N/A# fields enclosed by brackets "[]" replaced with your own identifying
1N/A# information: Portions Copyright [yyyy] [name of copyright owner]
1N/A#
1N/A# CDDL HEADER END
1N/A#
1N/A
1N/A#
1N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
1N/A# Use is subject to license terms.
1N/A#
1N/A
1N/APROG= stty ttymon ttyadm sttydefs
1N/AXPG4PROG= stty
1N/A
1N/A# the 'stty' objects have to be made in a separate directory
1N/A# since only they are built with the -DEUC flag (see below).
1N/ASTTYOBJ= sttyobjs/stty.o sttyobjs/sttytable.o sttyobjs/sttyparse.o
1N/A
1N/AXPG4STTYOBJ= sttyobjs.xpg4/stty.o sttyobjs.xpg4/sttytable.o \
1N/A sttyobjs.xpg4/sttyparse.o
1N/A
1N/ATTYMONOBJ= ttymon.o tmglobal.o tmhandler.o tmpmtab.o tmttydefs.o \
1N/A tmparse.o tmsig.o tmsac.o tmchild.o tmautobaud.o tmterm.o \
1N/A tmutmp.o tmpeek.o tmlog.o tmlock.o tmutil.o tmexpress.o \
1N/A sttytable.o sttyparse.o ulockf.o
1N/A
1N/ATTYADMOBJ= ttyadm.o tmutil.o admutil.o
1N/A
1N/ASTTYDEFSOBJ= sttydefs.o admutil.o tmttydefs.o tmparse.o sttytable.o \
1N/A sttyparse.o
1N/A
1N/AOBJS= $(STTYOBJ) $(XPG4STTYOBJ) $(TTYMONOBJ) $(TTYADMOBJ) $(STTYDEFSOBJ)
1N/ASTTYSRC= stty.c sttytable.c sttyparse.c
1N/ATTYMONSRC= $(TTYMONOBJ:%.o=%.c)
1N/ATTYADMSRC= $(TTYADMOBJ:%.o=%.c)
1N/ASTTYDEFSSRC= $(STTYDEFSOBJ:%.o=%.c)
1N/ASRCS= $(STTYSRC) $(TTYMONSRC) $(TTYADMSRC) $(STTYDEFSSRC)
1N/A
1N/A.PARALLEL: $(OBJS) $(PROG)
1N/A
1N/Ainclude ../Makefile.cmd
1N/A
1N/A# If machine name and /etc/issue file need to be printed
1N/A# before the service prompt is printed, then: CPPFLAGS += -DSYS_NAME
1N/A# If debug is needed, then: CPPFLAGS += -DDEBUG
1N/A# fix for 1111333 - turn on SYS_NAME so /etc/issue will be read if it exists
1N/ACPPFLAGS += -DSYS_NAME
1N/A$(XPG4):= CPPFLAGS += -DXPG4
1N/Asttydefs := LDLIBS += -lnsl
1N/Attymon := LDLIBS += -lnsl -lsec -ldevinfo
1N/A
1N/A# Only stty can be built with -DEUC. ttymon will dump core unless further
1N/A# changes are made to it.
1N/A$(STTYOBJ) := CPPFLAGS += -DEUC
1N/A$(XPG4STTYOBJ) := CPPFLAGS += -DEUC
1N/A
1N/ALINTFLAGS = -b -x
1N/ACFLAGS += $(CCVERBOSE)
1N/ALDFLAGS += $(MAPFILE.NGB:%=-M%)
1N/A
1N/A#
1N/A# Message catalog
1N/A#
1N/APOFILES= $(STTYOBJ:sttyobjs/%.o=%.po)
1N/APOFILE= ttymon.po
1N/A
1N/A
1N/ALIBSAFD= $(ROOTLIB)/saf
1N/ADIRS= $(LIBSAFD)
1N/ALIBSAF= ttymon
1N/AUSRSBINF= sttydefs ttyadm
1N/ABINF= stty
1N/AROOTLIBF= $(LIBSAF:%=$(LIBSAFD)/%)
1N/AROOTUSRSBINF= $(USRSBINF:%=$(ROOTUSRSBIN)/%)
1N/AROOTBINF= $(BINF:%=$(ROOTBIN)/%)
1N/A$(ROOTLIBF) := FILEMODE = 0555
1N/A$(ROOTUSRSBINF) := FILEMODE = 0755
1N/A
1N/A$(LIBSAFD)/% : %
1N/A $(INS.file)
1N/A
1N/A# /usr/xpg6/bin/stty is a symlink to /usr/bin/stty
1N/AROOTXPG6SYMLINK= $(ROOTXPG6BIN)/stty
1N/A.KEEP_STATE:
1N/A
1N/Aall: $(PROG) $(XPG4)
1N/A
1N/Astty: sttyobjs $(STTYOBJ) $(MAPFILE.NGB)
1N/A $(LINK.c) $(STTYOBJ) -o $@ $(LDLIBS)
1N/A $(POST_PROCESS)
1N/A
1N/Astty.xpg4: $(XPG4STTYOBJ) $(MAPFILE.NGB)
1N/A $(LINK.c) $(XPG4STTYOBJ) -o $@ $(LDLIBS)
1N/A $(POST_PROCESS)
1N/A
1N/A$(XPG4STTYOBJ): sttyobjs.xpg4
1N/A
1N/Asttyobjs/%.o: %.c
1N/A $(COMPILE.c) -o $@ $<
1N/A
1N/Asttyobjs.xpg4/%.o: %.c
1N/A $(COMPILE.c) -o $@ $<
1N/A
1N/Asttyobjs:
1N/A -@mkdir -p $@
1N/A
1N/Asttyobjs.xpg4:
1N/A -@mkdir -p $@
1N/A
1N/Attymon: $(TTYMONOBJ) $(MAPFILE.NGB)
1N/A $(LINK.c) $(TTYMONOBJ) -o $@ $(LDLIBS) -lpam
1N/A $(POST_PROCESS)
ttyadm: $(TTYADMOBJ) $(MAPFILE.NGB)
$(LINK.c) $(TTYADMOBJ) -o $@ $(LDLIBS)
$(POST_PROCESS)
sttydefs: $(STTYDEFSOBJ) $(MAPFILE.NGB)
$(LINK.c) $(STTYDEFSOBJ) -o $@ $(LDLIBS)
$(POST_PROCESS)
install: all $(DIRS) $(ROOTLIBF) $(ROOTUSRSBINF) $(ROOTBINF) \
$(ROOTXPG4PROG) $(ROOTXPG6SYMLINK)
-$(RM) $(ROOTETC)/getty
-$(SYMLINK) ../usr/lib/saf/ttymon $(ROOTETC)/getty
$(ROOTXPG6SYMLINK): $(ROOTBINF)
-$(RM) $@
-$(SYMLINK) ../../bin/$(BINF) $@
$(POFILE): $(POFILES)
$(RM) $@
cat $(POFILES) > $@
$(DIRS):
$(INS.dir)
clean:
$(RM) $(OBJS)
lint:
$(LINT.c) $(STTYSRC)
$(LINT.c) $(TTYMONSRC)
$(LINT.c) $(TTYADMSRC)
$(LINT.c) $(STTYDEFSSRC)
include ../Makefile.targ