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