xref: /titanic_44/usr/src/cmd/cmd-inet/usr.bin/pppd/plugins/Makefile (revision 5fd03bc0f2e00e7ba02316c2e08f45d52aab15db)
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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26#
27
28MINCONN =	minconn.so
29PASSPROMPT = 	passprompt.so
30PPPOE =		pppoe.so
31
32LIBRARIES =	minconn.so passprompt.so pppoe.so
33OBJECTS =	minconn.o passprompt.o pppoe.o
34
35# The rest of the sources are GPL
36LINTSRCS =	pppoe.c
37
38include		$(SRC)/lib/Makefile.lib
39include		../Makefile.def
40
41# Express objects in terms of "pics" thus triggering the appropriate CPPFLAGS,
42# CFLAGS and DYNFLAGS settings from lib/Makefile.lib to build shared objects.
43$(MINCONN):=	PICS = pics/minconn.o
44$(PASSPROMPT):=	PICS = pics/passprompt.o
45$(PPPOE):=	PICS = pics/pppoe.o
46
47# Suppress -h setting from DYNFLAGS as these libraries aren't linked against.
48# Establish external references through mapfiles and dependencies to allow
49# use of -zdefs.
50HSONAME=
51$(MINCONN):=	MAPFILES = mapfile-minconn
52$(PASSPROMPT):=	MAPFILES = mapfile-passprompt
53$(PPPOE):=	MAPFILES = mapfile-pppoe
54
55# A bug in pmake causes redundancy when '+=' is conditionally assigned, so
56# '=' is used with extra variables.
57XXXLDLIBS =
58$(PASSPROMPT):=	XXXLDLIBS = -lc
59LDLIBS +=	$(XXXLDLIBS)
60
61CPPFLAGS +=	-I.. -I$(SRC)/uts/common
62# XX64 -- this should not be needed -- fix me
63DYNFLAGS +=	-_gcc=-nostdlib
64
65CLOBBERFILES +=	$(LIBRARIES)
66
67LIBPPPPLUGIN=	$(LIBRARIES:%=$(LIBPPPPLUGINDIR)/%)
68
69$(LIBPPPPLUGIN):=	FILEMODE = 0544
70
71$(LIBPPPPLUGINDIR):=	FILEMODE = 0755
72
73.KEEP_STATE:
74
75all:	$(LIBRARIES)
76
77$(MINCONN): pics .WAIT $$(PICS)
78	$(BUILD.SO)
79	$(POST_PROCESS_SO)
80
81$(PASSPROMPT): pics .WAIT $$(PICS)
82	$(BUILD.SO)
83	$(POST_PROCESS_SO)
84
85$(PPPOE): pics .WAIT $$(PICS)
86	$(BUILD.SO)
87	$(POST_PROCESS_SO)
88
89install: all $(LIBPPPPLUGINDIR) $(LIBPPPPLUGIN)
90
91$(LIBPPPPLUGINDIR):
92	$(INS.dir)
93
94$(LIBPPPPLUGINDIR)/%:	%
95	$(INS.file)
96
97lint:
98	$(LINT.c) $(LINTSRCS) $(LDLIBS)
99
100include $(SRC)/lib/Makefile.targ
101