xref: /illumos-gate/usr/src/cmd/listen/Makefile (revision 3db86aab)
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#ident	"%Z%%M%	%I%	%E% SMI"
24#
25# Copyright (c) 1990 by Sun Microsystems, Inc.
26#
27PROG= listen nlps_server
28
29DBGOBJ	= doprnt.o
30DBGSRC	= doprnt.c
31
32LSOBJS  =	listen.o lslog.o lsdbf.o lsdata.o nstoa.o nlsaddr.o
33
34NLPSOBJS =	nlps_serv.o lsdbf.o lssmb.o nstoa.o lslog.o lsdata.o
35
36OBJS= $(LSOBJS) $(NLPSOBJS)
37LSSRC= $(LSOBJS:%.o=%.c)
38NLPSSRC= $(NLPSOBJS:%.o=%.c)
39SRCS= $(LSSRC) $(NLPSSRC)
40
41include ../Makefile.cmd
42
43LIBSAFD = $(ROOTLIB)/saf
44NETD = $(ROOT)/usr/net
45NETNLSD = $(NETD)/nls
46
47# Don"t re-install /usr/lib/saf/ and /usr/net, Targetdirs installs them
48#DIRS= $(LIBSAFD) $(NETD) $(NETNLSD)
49DIRS=  $(NETNLSD)
50ROOTSAFPROG= $(PROG:%=$(LIBSAFD)/%)
51
52# If machine name and /etc/issue file need to be printed # before the service prompt is printed, then:  CPPFLAGS += -DSYS_NAME
53# If debug is needed, then:  CPPFLAGS += -DDEBUG
54
55LDLIBS += -lnsl
56LINTFLAGS = -b -x
57OWNER= root
58GROUP= sys
59FILEMODE= 0755
60
61$(LIBSAFD)/% : %
62	$(INS.file)
63
64.KEEP_STATE:
65
66all: $(PROG)
67
68listen:	$(LSOBJS)
69	$(LINK.c) $(LSOBJS) -o $@ $(LDLIBS)
70	$(POST_PROCESS)
71
72nlps_server:	$(NLPSOBJS)
73	$(LINK.c) $(NLPSOBJS) -o $@ $(LDLIBS)
74	$(POST_PROCESS)
75
76install: all $(DIRS) $(ROOTSAFPROG)
77	$(RM) $(ROOT)/usr/net/nls/listen
78	-$(SYMLINK) ../../lib/saf/listen $(ROOT)/usr/net/nls/listen
79	$(RM) $(ROOT)/usr/net/nls/nlps_server
80	-$(SYMLINK) ../../lib/saf/nlps_server $(ROOT)/usr/net/nls/nlps_server
81
82$(DIRS):
83	$(INS.dir)
84
85clean:
86	$(RM) $(OBJS)
87
88lint:
89	$(LINT.c) $(LSSRC)
90	$(LINT.c) $(NLPSSRC)
91
92include ../Makefile.targ
93