17c478bd9Sstevel@tonic-gate#
2f808c858Sraf# CDDL HEADER START
3f808c858Sraf#
4f808c858Sraf# The contents of this file are subject to the terms of the
5f808c858Sraf# Common Development and Distribution License (the "License").
6f808c858Sraf# You may not use this file except in compliance with the License.
7f808c858Sraf#
8f808c858Sraf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9f808c858Sraf# or http://www.opensolaris.org/os/licensing.
10f808c858Sraf# See the License for the specific language governing permissions
11f808c858Sraf# and limitations under the License.
12f808c858Sraf#
13f808c858Sraf# When distributing Covered Code, include this CDDL HEADER in each
14f808c858Sraf# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15f808c858Sraf# If applicable, add the following below this CDDL HEADER, with the
16f808c858Sraf# fields enclosed by brackets "[]" replaced with your own identifying
17f808c858Sraf# information: Portions Copyright [yyyy] [name of copyright owner]
18f808c858Sraf#
19f808c858Sraf# CDDL HEADER END
20f808c858Sraf#
21f808c858Sraf#
2224fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
25ead9bb4bSYuri Pankov# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26ead9bb4bSYuri Pankov#
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gateMINCONN =	minconn.so
29*5a0af816SRobert MustacchiPASSPROMPT =	passprompt.so
307c478bd9Sstevel@tonic-gatePPPOE =		pppoe.so
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gateLIBRARIES =	minconn.so passprompt.so pppoe.so
337c478bd9Sstevel@tonic-gateOBJECTS =	minconn.o passprompt.o pppoe.o
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gate# The rest of the sources are GPL
367c478bd9Sstevel@tonic-gateLINTSRCS =	pppoe.c
377c478bd9Sstevel@tonic-gate
387c478bd9Sstevel@tonic-gateinclude		$(SRC)/lib/Makefile.lib
397c478bd9Sstevel@tonic-gateinclude		../Makefile.def
407c478bd9Sstevel@tonic-gate
417c478bd9Sstevel@tonic-gate# Express objects in terms of "pics" thus triggering the appropriate CPPFLAGS,
427c478bd9Sstevel@tonic-gate# CFLAGS and DYNFLAGS settings from lib/Makefile.lib to build shared objects.
437c478bd9Sstevel@tonic-gate$(MINCONN):=	PICS = pics/minconn.o
447c478bd9Sstevel@tonic-gate$(PASSPROMPT):=	PICS = pics/passprompt.o
457c478bd9Sstevel@tonic-gate$(PPPOE):=	PICS = pics/pppoe.o
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gate# Suppress -h setting from DYNFLAGS as these libraries aren't linked against.
487c478bd9Sstevel@tonic-gate# Establish external references through mapfiles and dependencies to allow
497c478bd9Sstevel@tonic-gate# use of -zdefs.
507c478bd9Sstevel@tonic-gateHSONAME=
51f808c858Sraf$(MINCONN):=	MAPFILES = mapfile-minconn
52f808c858Sraf$(PASSPROMPT):=	MAPFILES = mapfile-passprompt
53f808c858Sraf$(PPPOE):=	MAPFILES = mapfile-pppoe
547c478bd9Sstevel@tonic-gate
55*5a0af816SRobert Mustacchi$(PASSPROMPT):=	LDLIBS += -lc
56*5a0af816SRobert Mustacchi$(PPPOE):=	LDLIBS += -lc
577c478bd9Sstevel@tonic-gate
587c478bd9Sstevel@tonic-gateCPPFLAGS +=	-I.. -I$(SRC)/uts/common
597c478bd9Sstevel@tonic-gate# XX64 -- this should not be needed -- fix me
60bf40377cSwesolowsDYNFLAGS +=	-_gcc=-nostdlib
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gateCLOBBERFILES +=	$(LIBRARIES)
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gateLIBPPPPLUGIN=	$(LIBRARIES:%=$(LIBPPPPLUGINDIR)/%)
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gate$(LIBPPPPLUGIN):=	FILEMODE = 0544
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR):=	FILEMODE = 0755
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gate.KEEP_STATE:
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gateall:	$(LIBRARIES)
737c478bd9Sstevel@tonic-gate
74f808c858Sraf$(MINCONN): pics .WAIT $$(PICS)
757c478bd9Sstevel@tonic-gate	$(BUILD.SO)
767c478bd9Sstevel@tonic-gate	$(POST_PROCESS_SO)
777c478bd9Sstevel@tonic-gate
78f808c858Sraf$(PASSPROMPT): pics .WAIT $$(PICS)
797c478bd9Sstevel@tonic-gate	$(BUILD.SO)
807c478bd9Sstevel@tonic-gate	$(POST_PROCESS_SO)
817c478bd9Sstevel@tonic-gate
82f808c858Sraf$(PPPOE): pics .WAIT $$(PICS)
837c478bd9Sstevel@tonic-gate	$(BUILD.SO)
847c478bd9Sstevel@tonic-gate	$(POST_PROCESS_SO)
857c478bd9Sstevel@tonic-gate
86ead9bb4bSYuri Pankovinstall: all $(LIBPPPPLUGINDIR) $(LIBPPPPLUGIN)
877c478bd9Sstevel@tonic-gate
887c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR):
897c478bd9Sstevel@tonic-gate	$(INS.dir)
907c478bd9Sstevel@tonic-gate
917c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR)/%:	%
927c478bd9Sstevel@tonic-gate	$(INS.file)
937c478bd9Sstevel@tonic-gate
947c478bd9Sstevel@tonic-gatelint:
957c478bd9Sstevel@tonic-gate	$(LINT.c) $(LINTSRCS) $(LDLIBS)
967c478bd9Sstevel@tonic-gate
977c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/Makefile.targ
98