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