1*7c478bd9Sstevel@tonic-gate#
2*7c478bd9Sstevel@tonic-gate# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3*7c478bd9Sstevel@tonic-gate# Use is subject to license terms.
4*7c478bd9Sstevel@tonic-gate#
5*7c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
6*7c478bd9Sstevel@tonic-gate#
7*7c478bd9Sstevel@tonic-gate# cmd/cmd-inet/usr.bin/pppd/plugins/Makefile
8*7c478bd9Sstevel@tonic-gate#
9*7c478bd9Sstevel@tonic-gate
10*7c478bd9Sstevel@tonic-gate
11*7c478bd9Sstevel@tonic-gateMINCONN =	minconn.so
12*7c478bd9Sstevel@tonic-gatePASSPROMPT = 	passprompt.so
13*7c478bd9Sstevel@tonic-gatePPPOE =		pppoe.so
14*7c478bd9Sstevel@tonic-gate
15*7c478bd9Sstevel@tonic-gateLIBRARIES =	minconn.so passprompt.so pppoe.so
16*7c478bd9Sstevel@tonic-gateOBJECTS =	minconn.o passprompt.o pppoe.o
17*7c478bd9Sstevel@tonic-gate
18*7c478bd9Sstevel@tonic-gate# The rest of the sources are GPL
19*7c478bd9Sstevel@tonic-gateLINTSRCS =	pppoe.c
20*7c478bd9Sstevel@tonic-gate
21*7c478bd9Sstevel@tonic-gateinclude		$(SRC)/lib/Makefile.lib
22*7c478bd9Sstevel@tonic-gateinclude		../Makefile.def
23*7c478bd9Sstevel@tonic-gate
24*7c478bd9Sstevel@tonic-gate# Express objects in terms of "pics" thus triggering the appropriate CPPFLAGS,
25*7c478bd9Sstevel@tonic-gate# CFLAGS and DYNFLAGS settings from lib/Makefile.lib to build shared objects.
26*7c478bd9Sstevel@tonic-gate$(MINCONN):=	PICS = pics/minconn.o
27*7c478bd9Sstevel@tonic-gate$(PASSPROMPT):=	PICS = pics/passprompt.o
28*7c478bd9Sstevel@tonic-gate$(PPPOE):=	PICS = pics/pppoe.o
29*7c478bd9Sstevel@tonic-gate
30*7c478bd9Sstevel@tonic-gate# Suppress -h setting from DYNFLAGS as these libraries aren't linked against.
31*7c478bd9Sstevel@tonic-gate# Establish external references through mapfiles and dependencies to allow
32*7c478bd9Sstevel@tonic-gate# use of -zdefs.
33*7c478bd9Sstevel@tonic-gateHSONAME=
34*7c478bd9Sstevel@tonic-gate$(MINCONN):=	MAPFILE = mapfile-minconn
35*7c478bd9Sstevel@tonic-gate$(PASSPROMPT):=	MAPFILE = mapfile-passprompt
36*7c478bd9Sstevel@tonic-gate$(PPPOE):=	MAPFILE = mapfile-pppoe
37*7c478bd9Sstevel@tonic-gate
38*7c478bd9Sstevel@tonic-gate# A bug in pmake causes redundancy when '+=' is conditionally assigned, so
39*7c478bd9Sstevel@tonic-gate# '=' is used with extra variables.
40*7c478bd9Sstevel@tonic-gateXXXLDLIBS =
41*7c478bd9Sstevel@tonic-gate$(PASSPROMPT):=	XXXLDLIBS = -lc
42*7c478bd9Sstevel@tonic-gateLDLIBS +=	$(XXXLDLIBS)
43*7c478bd9Sstevel@tonic-gate
44*7c478bd9Sstevel@tonic-gateCPPFLAGS +=	-I.. -I$(SRC)/uts/common
45*7c478bd9Sstevel@tonic-gate# XX64 -- this should not be needed -- fix me
46*7c478bd9Sstevel@tonic-gate$(INTEL_BLD)DYNFLAGS +=	-_gcc=-nostdlib
47*7c478bd9Sstevel@tonic-gateDYNFLAGS +=	-M$(MAPFILE)
48*7c478bd9Sstevel@tonic-gate
49*7c478bd9Sstevel@tonic-gateCLOBBERFILES +=	$(LIBRARIES)
50*7c478bd9Sstevel@tonic-gate
51*7c478bd9Sstevel@tonic-gateLIBPPPPLUGIN=	$(LIBRARIES:%=$(LIBPPPPLUGINDIR)/%)
52*7c478bd9Sstevel@tonic-gate
53*7c478bd9Sstevel@tonic-gate$(LIBPPPPLUGIN):=	FILEMODE = 0544
54*7c478bd9Sstevel@tonic-gate$(LIBPPPPLUGIN):=	OWNER = root
55*7c478bd9Sstevel@tonic-gate$(LIBPPPPLUGIN):=	GROUP = bin
56*7c478bd9Sstevel@tonic-gate
57*7c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR):=	FILEMODE = 0755
58*7c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR):=	OWNER = root
59*7c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR):=	GROUP = bin
60*7c478bd9Sstevel@tonic-gate
61*7c478bd9Sstevel@tonic-gate# This is needed because install doesn't handle -g well.
62*7c478bd9Sstevel@tonic-gateUTILDIR=	$(ROOT)/usr/share/src/ppputil
63*7c478bd9Sstevel@tonic-gate$(UTILDIR):=	OWNER = root
64*7c478bd9Sstevel@tonic-gate$(UTILDIR):=	GROUP = bin
65*7c478bd9Sstevel@tonic-gateROOTSRC=	$(UTILDIR)/plugins
66*7c478bd9Sstevel@tonic-gateSRCFILES=	Makefile minconn.c passprompt.c pppd.h
67*7c478bd9Sstevel@tonic-gateROOTSRCFILES=	$(SRCFILES:%=$(ROOTSRC)/%)
68*7c478bd9Sstevel@tonic-gate$(ROOTSRC):=	OWNER = root
69*7c478bd9Sstevel@tonic-gate$(ROOTSRC):=	GROUP = bin
70*7c478bd9Sstevel@tonic-gate$(ROOTSRCFILES):=	FILEMODE= 0444
71*7c478bd9Sstevel@tonic-gate$(ROOTSRCFILES):=	OWNER = root
72*7c478bd9Sstevel@tonic-gate$(ROOTSRCFILES):=	GROUP = bin
73*7c478bd9Sstevel@tonic-gate
74*7c478bd9Sstevel@tonic-gate.KEEP_STATE:
75*7c478bd9Sstevel@tonic-gate
76*7c478bd9Sstevel@tonic-gateall:	$(LIBRARIES)
77*7c478bd9Sstevel@tonic-gate
78*7c478bd9Sstevel@tonic-gate$(MINCONN): pics .WAIT $$(MAPFILE) $$(PICS)
79*7c478bd9Sstevel@tonic-gate	$(BUILD.SO)
80*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_SO)
81*7c478bd9Sstevel@tonic-gate
82*7c478bd9Sstevel@tonic-gate$(PASSPROMPT): pics .WAIT $$(MAPFILE) $$(PICS)
83*7c478bd9Sstevel@tonic-gate	$(BUILD.SO)
84*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_SO)
85*7c478bd9Sstevel@tonic-gate
86*7c478bd9Sstevel@tonic-gate$(PPPOE): pics .WAIT $$(MAPFILE) $$(PICS)
87*7c478bd9Sstevel@tonic-gate	$(BUILD.SO)
88*7c478bd9Sstevel@tonic-gate	$(POST_PROCESS_SO)
89*7c478bd9Sstevel@tonic-gate
90*7c478bd9Sstevel@tonic-gateinstall: all $(LIBPPPPLUGINDIR) $(LIBPPPPLUGIN) install_src
91*7c478bd9Sstevel@tonic-gate
92*7c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR):
93*7c478bd9Sstevel@tonic-gate	$(INS.dir)
94*7c478bd9Sstevel@tonic-gate
95*7c478bd9Sstevel@tonic-gate$(LIBPPPPLUGINDIR)/%:	%
96*7c478bd9Sstevel@tonic-gate	$(INS.file)
97*7c478bd9Sstevel@tonic-gate
98*7c478bd9Sstevel@tonic-gate$(UTILDIR) $(ROOTSRC):
99*7c478bd9Sstevel@tonic-gate	$(INS.dir)
100*7c478bd9Sstevel@tonic-gate
101*7c478bd9Sstevel@tonic-gate$(ROOTSRC)/Makefile%: Makefile%.dist
102*7c478bd9Sstevel@tonic-gate	$(INS.rename)
103*7c478bd9Sstevel@tonic-gate
104*7c478bd9Sstevel@tonic-gate$(ROOTSRC)/%.h: ../%.h
105*7c478bd9Sstevel@tonic-gate	$(INS.file)
106*7c478bd9Sstevel@tonic-gate
107*7c478bd9Sstevel@tonic-gate$(ROOTSRC)/%: %
108*7c478bd9Sstevel@tonic-gate	$(INS.file)
109*7c478bd9Sstevel@tonic-gate
110*7c478bd9Sstevel@tonic-gateinstall_src:	$(UTILDIR) .WAIT $(ROOTSRC) .WAIT $(ROOTSRCFILES)
111*7c478bd9Sstevel@tonic-gate
112*7c478bd9Sstevel@tonic-gatelint:
113*7c478bd9Sstevel@tonic-gate	$(LINT.c) $(LINTSRCS) $(LDLIBS)
114*7c478bd9Sstevel@tonic-gate
115*7c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/Makefile.targ
116