1*7c478bd9Sstevel@tonic-gate# 2*7c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 3*7c478bd9Sstevel@tonic-gate# 4*7c478bd9Sstevel@tonic-gate# Copyright 2004 Sun Microsystems, Inc. All rights reserved. 5*7c478bd9Sstevel@tonic-gate# Use is subject to license terms. 6*7c478bd9Sstevel@tonic-gate# 7*7c478bd9Sstevel@tonic-gate# cmd/cmd-inet/usr.bin/pppd/Makefile 8*7c478bd9Sstevel@tonic-gate# 9*7c478bd9Sstevel@tonic-gate 10*7c478bd9Sstevel@tonic-gateinclude ../../../Makefile.cmd 11*7c478bd9Sstevel@tonic-gateinclude Makefile.def 12*7c478bd9Sstevel@tonic-gate 13*7c478bd9Sstevel@tonic-gatePROG= pppd 14*7c478bd9Sstevel@tonic-gateSUBDIRS= plugins 15*7c478bd9Sstevel@tonic-gateOBJS= auth.o ccp.o chap.o demand.o fsm.o ipcp.o ipv6cp.o \ 16*7c478bd9Sstevel@tonic-gate lcp.o magic.o main.o options.o sys-solaris.o upap.o utils.o \ 17*7c478bd9Sstevel@tonic-gate multilink.o cbcp.o 18*7c478bd9Sstevel@tonic-gate 19*7c478bd9Sstevel@tonic-gate# Object tdb.o used only for Multilink; not supported yet. 20*7c478bd9Sstevel@tonic-gate 21*7c478bd9Sstevel@tonic-gateall:= TARGET= all 22*7c478bd9Sstevel@tonic-gateinstall:= TARGET= install 23*7c478bd9Sstevel@tonic-gateclean:= TARGET= clean 24*7c478bd9Sstevel@tonic-gateclobber:= TARGET= clobber 25*7c478bd9Sstevel@tonic-gatelint:= TARGET= lint 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gateLDLIBS += -lpam -lmd5 -lsocket -lnsl 28*7c478bd9Sstevel@tonic-gate 29*7c478bd9Sstevel@tonic-gate# 30*7c478bd9Sstevel@tonic-gate# We need absolute path to /etc/ppp/plugins and /usr/lib/inet/ppp, not 31*7c478bd9Sstevel@tonic-gate# that of the proto area 32*7c478bd9Sstevel@tonic-gate# 33*7c478bd9Sstevel@tonic-gateLDFLAGS += -R$(ETCPPPPLUGINDIR_ABS) -R$(LIBPPPPLUGINDIR_ABS) 34*7c478bd9Sstevel@tonic-gate 35*7c478bd9Sstevel@tonic-gateCPPFLAGS += -DPLUGIN -DSVR4 -DSOL2 -DINET6 36*7c478bd9Sstevel@tonic-gateCPPFLAGS += -D_PATH_VARRUN='"/var/run/"' 37*7c478bd9Sstevel@tonic-gateCPPFLAGS += -DNEGOTIATE_FCS -DCBCP_SUPPORT -DALLOW_PAM -DHAS_SHADOW 38*7c478bd9Sstevel@tonic-gateCPPFLAGS += -DHAVE_MMAP -DCOMP_TUNE -DMUX_FRAME 39*7c478bd9Sstevel@tonic-gate$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG 40*7c478bd9Sstevel@tonic-gate 41*7c478bd9Sstevel@tonic-gate.KEEP_STATE: 42*7c478bd9Sstevel@tonic-gate 43*7c478bd9Sstevel@tonic-gate.PARALLEL: $(SUBDIRS) 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gateall: $(PROG) $(SUBDIRS) 46*7c478bd9Sstevel@tonic-gate 47*7c478bd9Sstevel@tonic-gate# MS-CHAP support 48*7c478bd9Sstevel@tonic-gateCPPFLAGS += -DHAVE_CRYPT_H -DUSE_CRYPT 49*7c478bd9Sstevel@tonic-gateCPPFLAGS += -DCHAPMS -DMSLANMAN 50*7c478bd9Sstevel@tonic-gateCPPFLAGS += -DCHAPMSV2 51*7c478bd9Sstevel@tonic-gateOBJS += chap_ms.o md4.o sha1.o 52*7c478bd9Sstevel@tonic-gateEXOBJS += mschap_test.o 53*7c478bd9Sstevel@tonic-gateCLOBBERFILES += mschap_test 54*7c478bd9Sstevel@tonic-gate 55*7c478bd9Sstevel@tonic-gate# This is used *only* for testing the portability of the libraries 56*7c478bd9Sstevel@tonic-gate# required for MS-CHAPv1. It is not needed in any normal system and 57*7c478bd9Sstevel@tonic-gate# is not built by default. 58*7c478bd9Sstevel@tonic-gatemschap_test: mschap_test.o chap_ms.o md4.o sha1.o 59*7c478bd9Sstevel@tonic-gate $(LINK.c) -o mschap_test mschap_test.o chap_ms.o md4.o sha1.o \ 60*7c478bd9Sstevel@tonic-gate $(LDFLAGS) 61*7c478bd9Sstevel@tonic-gate @echo "Run with 'mschap_test 00000000000000000000000000000000 hello'" 62*7c478bd9Sstevel@tonic-gate @echo 63*7c478bd9Sstevel@tonic-gate @echo "Output should be:" 64*7c478bd9Sstevel@tonic-gate @echo 65*7c478bd9Sstevel@tonic-gate @echo " MS-CHAPv1 with LAN Manager -- 49 bytes:" 66*7c478bd9Sstevel@tonic-gate @echo " C9 CA EE 9B 1C A7 87 04" 67*7c478bd9Sstevel@tonic-gate @echo " 79 36 8C 55 AB 88 EC 5A" 68*7c478bd9Sstevel@tonic-gate @echo " 57 E9 A1 B7 95 40 C3 74" 69*7c478bd9Sstevel@tonic-gate @echo " F4 D9 9D AF 82 64 DC 3C" 70*7c478bd9Sstevel@tonic-gate @echo " 53 F9 BC 92 14 B5 5D 9E" 71*7c478bd9Sstevel@tonic-gate @echo " 78 C4 21 48 9D B7 A8 B4" 72*7c478bd9Sstevel@tonic-gate @echo " 01" 73*7c478bd9Sstevel@tonic-gate @echo " MS-CHAPv2 -- 49 bytes:" 74*7c478bd9Sstevel@tonic-gate @echo " xx xx xx xx xx xx xx xx" 75*7c478bd9Sstevel@tonic-gate @echo " xx xx xx xx xx xx xx xx" 76*7c478bd9Sstevel@tonic-gate @echo " 00 00 00 00 00 00 00 00" 77*7c478bd9Sstevel@tonic-gate @echo " xx xx xx xx xx xx xx xx" 78*7c478bd9Sstevel@tonic-gate @echo " xx xx xx xx xx xx xx xx" 79*7c478bd9Sstevel@tonic-gate @echo " xx xx xx xx xx xx xx xx" 80*7c478bd9Sstevel@tonic-gate @echo " 00" 81*7c478bd9Sstevel@tonic-gate 82*7c478bd9Sstevel@tonic-gateLINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 83*7c478bd9Sstevel@tonic-gateLINTFLAGS += -erroff=E_GLOBAL_COULD_BE_STATIC2 84*7c478bd9Sstevel@tonic-gateLINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2 85*7c478bd9Sstevel@tonic-gate 86*7c478bd9Sstevel@tonic-gateSRCS= $(OBJS:%.o=%.c) 87*7c478bd9Sstevel@tonic-gate 88*7c478bd9Sstevel@tonic-gate.PARALLEL: $(OBJS) 89*7c478bd9Sstevel@tonic-gate 90*7c478bd9Sstevel@tonic-gate$(PROG): $(OBJS) 91*7c478bd9Sstevel@tonic-gate $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 92*7c478bd9Sstevel@tonic-gate $(POST_PROCESS) 93*7c478bd9Sstevel@tonic-gate 94*7c478bd9Sstevel@tonic-gate$(ROOTPROG):= FILEMODE = 04555 95*7c478bd9Sstevel@tonic-gate$(ROOTPROG):= OWNER = root 96*7c478bd9Sstevel@tonic-gate 97*7c478bd9Sstevel@tonic-gateASPPP2PPPD= $(ROOTUSRSBIN)/asppp2pppd 98*7c478bd9Sstevel@tonic-gate$(ASPPP2PPPD):= OWNER=root 99*7c478bd9Sstevel@tonic-gate$(ASPPP2PPPD):= GROUP=bin 100*7c478bd9Sstevel@tonic-gate$(ASPPP2PPPD):= FILEMODE = 0550 101*7c478bd9Sstevel@tonic-gate 102*7c478bd9Sstevel@tonic-gateinstall: $(PROG) .WAIT $(SUBDIRS) $(ROOTPROG) $(ETCPPPDIR) $(ASPPP2PPPD) 103*7c478bd9Sstevel@tonic-gate 104*7c478bd9Sstevel@tonic-gate$(ETCPPPDIR)/%: % 105*7c478bd9Sstevel@tonic-gate $(INS.file) 106*7c478bd9Sstevel@tonic-gate 107*7c478bd9Sstevel@tonic-gate$(ETCPPPDIR): 108*7c478bd9Sstevel@tonic-gate $(INS.dir) 109*7c478bd9Sstevel@tonic-gate 110*7c478bd9Sstevel@tonic-gate$(SUBDIRS): FRC 111*7c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 112*7c478bd9Sstevel@tonic-gate 113*7c478bd9Sstevel@tonic-gateFRC: 114*7c478bd9Sstevel@tonic-gate 115*7c478bd9Sstevel@tonic-gateLINTOBJS=$(OBJS:%.o=%.ln) 116*7c478bd9Sstevel@tonic-gateCLOBBERFILES += $(LINTOBJS) 117*7c478bd9Sstevel@tonic-gate 118*7c478bd9Sstevel@tonic-gateclean: $(SUBDIRS) 119*7c478bd9Sstevel@tonic-gate $(RM) $(OBJS) $(EXOBJS) 120*7c478bd9Sstevel@tonic-gate 121*7c478bd9Sstevel@tonic-gatesha1.ln:= LINTFLAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED 122*7c478bd9Sstevel@tonic-gate 123*7c478bd9Sstevel@tonic-gate# Not using the default lint target here so that we can disable 124*7c478bd9Sstevel@tonic-gate# warnings per module as needed. 125*7c478bd9Sstevel@tonic-gatelint: $(SUBDIRS) $(LINTOBJS) 126*7c478bd9Sstevel@tonic-gate $(LINT.c) $(LINTOBJS) $(LDLIBS) 127*7c478bd9Sstevel@tonic-gate 128*7c478bd9Sstevel@tonic-gateclobber: $(SUBDIRS) 129*7c478bd9Sstevel@tonic-gate 130*7c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ 131