xref: /titanic_51/usr/src/cmd/lp/model/netpr/Makefile (revision bfed486ad8de8b8ebc6345a8e10accae08bf2f45)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21#
22# ident	"%Z%%M%	%I%	%E% SMI"
23#
24# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27# cmd/lp/model/netpr
28#
29
30PROG=		netpr
31
32include		../../Makefile.lp
33
34PURIFYOPTS      = -logfile=/tmp/errs.%p
35PURIFY          = purify $(PURIFYOPTS)
36
37CPPFLAGS =	-I. -I$(LPINC) 	\
38		$(CPPFLAGS.master)
39
40HDRS=				\
41		netpr.h		\
42		netdebug.h
43
44SRCS=				\
45		netpr.c		\
46		misc.c		\
47		net.c		\
48		tcp_misc.c	\
49		bsd_misc.c
50
51OBJS=		$(SRCS:.c=.o)
52
53
54LPLIBS =			\
55		$(LIBMSG)	\
56		$(LIBFRM)	\
57		$(LIBREQ)	\
58		$(LIBPRT)	\
59		$(LIBCLS)	\
60		$(LIBACC)	\
61		$(LIBFLT)	\
62		$(LIBUSR)	\
63		$(LIBOAM)	\
64		$(LIBLP)	\
65		$(LIBSEC)	\
66		$(LIBSYS)
67
68SYSLIBS=	-lnsl -lsocket
69
70LDLIBS +=	$(LPLIBS) $(SYSLIBS)
71ROOTLIBLPBIN =	$(ROOTLIBLP)/bin
72
73ROOTNETPRPROG =	$(PROG:%=$(ROOTLIBLPBIN)/%)
74
75FILEMODE=	04511
76OWNER=		root
77GROUP=		bin
78
79POFILE=		lp_model_netpr.po
80
81.KEEP_STATE:
82
83all:		$(PROG)
84
85install:	all $(ROOTLIBLPBIN) $(ROOTNETPRPROG)
86
87$(ROOTLIBLPBIN):
88	$(INS.dir)
89
90$(ROOTLIBLPBIN)/%:	%
91	$(INS.file)
92
93
94$(PROG):	$(OBJS)
95		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
96		$(POST_PROCESS)
97
98$(PROG).pure:	$(OBJS)
99		$(PURIFY) $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
100		$(POST_PROCESS)
101
102clean:
103		$(RM) $(OBJS)
104
105clobber:	clean
106		-$(RM) $(PROG) $(CLOBBERFILES)
107
108strip:
109		$(STRIP) $(PROG)
110
111cstyle:
112		cstyle $(SRCS)
113
114LINTFLAGS	+= -lnsl -lsocket
115lint:
116		$(LINT.c) $(SRCS) $(LDLIBS)
117
118include		../Makefile.msg
119