4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
26 # Copyright (c) 2018, Joyent, Inc.
28 PROG
= stty ttymon ttyadm sttydefs
30 # the 'stty' objects have to be made in a separate directory
31 # since only they are built with the -DEUC flag (see below).
32 STTYOBJ
= sttyobjs
/stty.o sttyobjs
/sttytable.o sttyobjs
/sttyparse.o
34 TTYMONOBJ
= ttymon.o tmglobal.o tmhandler.o tmpmtab.o tmttydefs.o \
35 tmparse.o tmsig.o tmsac.o tmchild.o tmautobaud.o tmterm.o \
36 tmutmp.o tmpeek.o tmlog.o tmlock.o tmutil.o tmexpress.o \
37 sttytable.o sttyparse.o ulockf.o
39 TTYADMOBJ
= ttyadm.o tmutil.o admutil.o
41 STTYDEFSOBJ
= sttydefs.o admutil.o tmttydefs.o tmparse.o sttytable.o \
44 OBJS
= $(STTYOBJ
) $(TTYMONOBJ
) $(TTYADMOBJ
) $(STTYDEFSOBJ
)
45 STTYSRC
= stty.c sttytable.c sttyparse.c
46 TTYMONSRC
= $(TTYMONOBJ
:%.o
=%.c
)
47 TTYADMSRC
= $(TTYADMOBJ
:%.o
=%.c
)
48 STTYDEFSSRC
= $(STTYDEFSOBJ
:%.o
=%.c
)
49 SRCS
= $(STTYSRC
) $(TTYMONSRC
) $(TTYADMSRC
) $(STTYDEFSSRC
)
51 .PARALLEL
: $(OBJS
) $(PROG
)
53 include ..
/Makefile.cmd
55 # If machine name and /etc/issue file need to be printed
56 # before the service prompt is printed, then: CPPFLAGS += -DSYS_NAME
57 # If debug is needed, then: CPPFLAGS += -DDEBUG
58 # fix for 1111333 - turn on SYS_NAME so /etc/issue will be read if it exists
59 CPPFLAGS
+= -DSYS_NAME
61 ttymon
:= LDLIBS
+= -lsec
-ldevinfo
63 # Only stty can be built with -DEUC. ttymon will dump core unless further
64 # changes are made to it.
65 $(STTYOBJ
) := CPPFLAGS
+= -DEUC
67 CERRWARN
+= -Wno-parentheses
68 CERRWARN
+= -Wno-unused-variable
69 CERRWARN
+= -Wno-uninitialized
70 CERRWARN
+= -Wno-extra
78 POFILES
= $(STTYOBJ
:sttyobjs
/%.o
=%.po
)
82 LIBSAFD
= $(ROOTLIB64
)/saf
85 USRSBINF
= sttydefs ttyadm
87 ROOTLIBF
= $(LIBSAF
:%=$(LIBSAFD
)/%)
88 ROOTUSRSBINF
= $(USRSBINF
:%=$(ROOTUSRSBIN
)/%)
89 ROOTBINF
= $(BINF
:%=$(ROOTBIN
)/%)
90 $(ROOTLIBF
) := FILEMODE
= 0555
91 $(ROOTUSRSBINF
) := FILEMODE
= 0755
100 stty
: sttyobjs
$(STTYOBJ
)
101 $(LINK.c
) $(STTYOBJ
) -o
$@
$(LDLIBS
)
105 $(COMPILE.c
) -o
$@
$<
111 $(LINK.c
) $(TTYMONOBJ
) -o
$@
$(LDLIBS
) -lpam
115 $(LINK.c
) $(TTYADMOBJ
) -o
$@
$(LDLIBS
)
118 sttydefs
: $(STTYDEFSOBJ
)
119 $(LINK.c
) $(STTYDEFSOBJ
) -o
$@
$(LDLIBS
)
122 install: all $(DIRS
) $(ROOTLIBF
) $(ROOTUSRSBINF
) $(ROOTBINF
)
124 $(POFILE
): $(POFILES
)
134 include ..
/Makefile.targ