xref: /titanic_50/usr/src/cmd/cmd-inet/usr.bin/pppd/plugins/Makefile (revision ead9bb4b1be81d7bbf8ed86ee41d6c1e58b069a3)
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#
25*ead9bb4bSYuri Pankov# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26*ead9bb4bSYuri Pankov#
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gateMINCONN =	minconn.so
297c478bd9Sstevel@tonic-gatePASSPROMPT = 	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
557c478bd9Sstevel@tonic-gate# A bug in pmake causes redundancy when '+=' is conditionally assigned, so
567c478bd9Sstevel@tonic-gate# '=' is used with extra variables.
577c478bd9Sstevel@tonic-gateXXXLDLIBS =
587c478bd9Sstevel@tonic-gate$(PASSPROMPT):=	XXXLDLIBS = -lc
597c478bd9Sstevel@tonic-gateLDLIBS +=	$(XXXLDLIBS)
607c478bd9Sstevel@tonic-gate
617c478bd9Sstevel@tonic-gateCPPFLAGS +=	-I.. -I$(SRC)/uts/common
627c478bd9Sstevel@tonic-gate# XX64 -- this should not be needed -- fix me
63bf40377cSwesolowsDYNFLAGS +=	-_gcc=-nostdlib
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gateCLOBBERFILES +=	$(LIBRARIES)
667c478bd9Sstevel@tonic-gate
677c478bd9Sstevel@tonic-gateLIBPPPPLUGIN=	$(LIBRARIES:%=$(LIBPPPPLUGINDIR)/%)
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gate$(LIBPPPPLUGIN):=	FILEMODE = 0544
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR):=	FILEMODE = 0755
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gate.KEEP_STATE:
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gateall:	$(LIBRARIES)
767c478bd9Sstevel@tonic-gate
77f808c858Sraf$(MINCONN): pics .WAIT $$(PICS)
787c478bd9Sstevel@tonic-gate	$(BUILD.SO)
797c478bd9Sstevel@tonic-gate	$(POST_PROCESS_SO)
807c478bd9Sstevel@tonic-gate
81f808c858Sraf$(PASSPROMPT): pics .WAIT $$(PICS)
827c478bd9Sstevel@tonic-gate	$(BUILD.SO)
837c478bd9Sstevel@tonic-gate	$(POST_PROCESS_SO)
847c478bd9Sstevel@tonic-gate
85f808c858Sraf$(PPPOE): pics .WAIT $$(PICS)
867c478bd9Sstevel@tonic-gate	$(BUILD.SO)
877c478bd9Sstevel@tonic-gate	$(POST_PROCESS_SO)
887c478bd9Sstevel@tonic-gate
89*ead9bb4bSYuri Pankovinstall: all $(LIBPPPPLUGINDIR) $(LIBPPPPLUGIN)
907c478bd9Sstevel@tonic-gate
917c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR):
927c478bd9Sstevel@tonic-gate	$(INS.dir)
937c478bd9Sstevel@tonic-gate
947c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR)/%:	%
957c478bd9Sstevel@tonic-gate	$(INS.file)
967c478bd9Sstevel@tonic-gate
977c478bd9Sstevel@tonic-gatelint:
987c478bd9Sstevel@tonic-gate	$(LINT.c) $(LINTSRCS) $(LDLIBS)
997c478bd9Sstevel@tonic-gate
1007c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/Makefile.targ
101