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