17c478bd9Sstevel@tonic-gate# 2*f808c858Sraf# CDDL HEADER START 3*f808c858Sraf# 4*f808c858Sraf# The contents of this file are subject to the terms of the 5*f808c858Sraf# Common Development and Distribution License (the "License"). 6*f808c858Sraf# You may not use this file except in compliance with the License. 7*f808c858Sraf# 8*f808c858Sraf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*f808c858Sraf# or http://www.opensolaris.org/os/licensing. 10*f808c858Sraf# See the License for the specific language governing permissions 11*f808c858Sraf# and limitations under the License. 12*f808c858Sraf# 13*f808c858Sraf# When distributing Covered Code, include this CDDL HEADER in each 14*f808c858Sraf# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*f808c858Sraf# If applicable, add the following below this CDDL HEADER, with the 16*f808c858Sraf# fields enclosed by brackets "[]" replaced with your own identifying 17*f808c858Sraf# information: Portions Copyright [yyyy] [name of copyright owner] 18*f808c858Sraf# 19*f808c858Sraf# CDDL HEADER END 20*f808c858Sraf# 21*f808c858Sraf# 22*f808c858Sraf# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 267c478bd9Sstevel@tonic-gate# 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= 51*f808c858Sraf$(MINCONN):= MAPFILES = mapfile-minconn 52*f808c858Sraf$(PASSPROMPT):= MAPFILES = mapfile-passprompt 53*f808c858Sraf$(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$(LIBPPPPLUGIN):= OWNER = root 717c478bd9Sstevel@tonic-gate$(LIBPPPPLUGIN):= GROUP = bin 727c478bd9Sstevel@tonic-gate 737c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR):= FILEMODE = 0755 747c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR):= OWNER = root 757c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR):= GROUP = bin 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gate# This is needed because install doesn't handle -g well. 787c478bd9Sstevel@tonic-gateUTILDIR= $(ROOT)/usr/share/src/ppputil 797c478bd9Sstevel@tonic-gate$(UTILDIR):= OWNER = root 807c478bd9Sstevel@tonic-gate$(UTILDIR):= GROUP = bin 817c478bd9Sstevel@tonic-gateROOTSRC= $(UTILDIR)/plugins 827c478bd9Sstevel@tonic-gateSRCFILES= Makefile minconn.c passprompt.c pppd.h 837c478bd9Sstevel@tonic-gateROOTSRCFILES= $(SRCFILES:%=$(ROOTSRC)/%) 847c478bd9Sstevel@tonic-gate$(ROOTSRC):= OWNER = root 857c478bd9Sstevel@tonic-gate$(ROOTSRC):= GROUP = bin 867c478bd9Sstevel@tonic-gate$(ROOTSRCFILES):= FILEMODE= 0444 877c478bd9Sstevel@tonic-gate$(ROOTSRCFILES):= OWNER = root 887c478bd9Sstevel@tonic-gate$(ROOTSRCFILES):= GROUP = bin 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gate.KEEP_STATE: 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gateall: $(LIBRARIES) 937c478bd9Sstevel@tonic-gate 94*f808c858Sraf$(MINCONN): pics .WAIT $$(PICS) 957c478bd9Sstevel@tonic-gate $(BUILD.SO) 967c478bd9Sstevel@tonic-gate $(POST_PROCESS_SO) 977c478bd9Sstevel@tonic-gate 98*f808c858Sraf$(PASSPROMPT): pics .WAIT $$(PICS) 997c478bd9Sstevel@tonic-gate $(BUILD.SO) 1007c478bd9Sstevel@tonic-gate $(POST_PROCESS_SO) 1017c478bd9Sstevel@tonic-gate 102*f808c858Sraf$(PPPOE): pics .WAIT $$(PICS) 1037c478bd9Sstevel@tonic-gate $(BUILD.SO) 1047c478bd9Sstevel@tonic-gate $(POST_PROCESS_SO) 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gateinstall: all $(LIBPPPPLUGINDIR) $(LIBPPPPLUGIN) install_src 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR): 1097c478bd9Sstevel@tonic-gate $(INS.dir) 1107c478bd9Sstevel@tonic-gate 1117c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR)/%: % 1127c478bd9Sstevel@tonic-gate $(INS.file) 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gate$(UTILDIR) $(ROOTSRC): 1157c478bd9Sstevel@tonic-gate $(INS.dir) 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gate$(ROOTSRC)/Makefile%: Makefile%.dist 1187c478bd9Sstevel@tonic-gate $(INS.rename) 1197c478bd9Sstevel@tonic-gate 1207c478bd9Sstevel@tonic-gate$(ROOTSRC)/%.h: ../%.h 1217c478bd9Sstevel@tonic-gate $(INS.file) 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gate$(ROOTSRC)/%: % 1247c478bd9Sstevel@tonic-gate $(INS.file) 1257c478bd9Sstevel@tonic-gate 1267c478bd9Sstevel@tonic-gateinstall_src: $(UTILDIR) .WAIT $(ROOTSRC) .WAIT $(ROOTSRCFILES) 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gatelint: 1297c478bd9Sstevel@tonic-gate $(LINT.c) $(LINTSRCS) $(LDLIBS) 1307c478bd9Sstevel@tonic-gate 1317c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/Makefile.targ 132