17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 37c478bd9Sstevel@tonic-gate# 4*fb60e41dSss150715# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 57c478bd9Sstevel@tonic-gate# Use is subject to license terms. 67c478bd9Sstevel@tonic-gate# 77c478bd9Sstevel@tonic-gate# cmd/cmd-inet/usr.bin/pppd/Makefile 87c478bd9Sstevel@tonic-gate# 97c478bd9Sstevel@tonic-gate 107c478bd9Sstevel@tonic-gateinclude ../../../Makefile.cmd 117c478bd9Sstevel@tonic-gateinclude Makefile.def 127c478bd9Sstevel@tonic-gate 137c478bd9Sstevel@tonic-gatePROG= pppd 147c478bd9Sstevel@tonic-gateSUBDIRS= plugins 157c478bd9Sstevel@tonic-gateOBJS= auth.o ccp.o chap.o demand.o fsm.o ipcp.o ipv6cp.o \ 167c478bd9Sstevel@tonic-gate lcp.o magic.o main.o options.o sys-solaris.o upap.o utils.o \ 177c478bd9Sstevel@tonic-gate multilink.o cbcp.o 187c478bd9Sstevel@tonic-gate 197c478bd9Sstevel@tonic-gate# Object tdb.o used only for Multilink; not supported yet. 207c478bd9Sstevel@tonic-gate 217c478bd9Sstevel@tonic-gateall:= TARGET= all 227c478bd9Sstevel@tonic-gateinstall:= TARGET= install 237c478bd9Sstevel@tonic-gateclean:= TARGET= clean 247c478bd9Sstevel@tonic-gateclobber:= TARGET= clobber 257c478bd9Sstevel@tonic-gatelint:= TARGET= lint 267c478bd9Sstevel@tonic-gate 27*fb60e41dSss150715LDLIBS += -lpam -lmd -lsocket -lnsl -ldlpi 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate# 307c478bd9Sstevel@tonic-gate# We need absolute path to /etc/ppp/plugins and /usr/lib/inet/ppp, not 317c478bd9Sstevel@tonic-gate# that of the proto area 327c478bd9Sstevel@tonic-gate# 337c478bd9Sstevel@tonic-gateLDFLAGS += -R$(ETCPPPPLUGINDIR_ABS) -R$(LIBPPPPLUGINDIR_ABS) 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gateCPPFLAGS += -DPLUGIN -DSVR4 -DSOL2 -DINET6 367c478bd9Sstevel@tonic-gateCPPFLAGS += -D_PATH_VARRUN='"/var/run/"' 377c478bd9Sstevel@tonic-gateCPPFLAGS += -DNEGOTIATE_FCS -DCBCP_SUPPORT -DALLOW_PAM -DHAS_SHADOW 387c478bd9Sstevel@tonic-gateCPPFLAGS += -DHAVE_MMAP -DCOMP_TUNE -DMUX_FRAME 397c478bd9Sstevel@tonic-gate$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gate.KEEP_STATE: 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gate.PARALLEL: $(SUBDIRS) 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gateall: $(PROG) $(SUBDIRS) 467c478bd9Sstevel@tonic-gate 477c478bd9Sstevel@tonic-gate# MS-CHAP support 48eedefb95SdarrenmCPPFLAGS += -DHAVE_CRYPT_H -DUSE_CRYPT -DHAVE_LIBMD 497c478bd9Sstevel@tonic-gateCPPFLAGS += -DCHAPMS -DMSLANMAN 507c478bd9Sstevel@tonic-gateCPPFLAGS += -DCHAPMSV2 51734b6a94SdarrenmOBJS += chap_ms.o 527c478bd9Sstevel@tonic-gateEXOBJS += mschap_test.o 537c478bd9Sstevel@tonic-gateCLOBBERFILES += mschap_test 547c478bd9Sstevel@tonic-gate 557c478bd9Sstevel@tonic-gate# This is used *only* for testing the portability of the libraries 567c478bd9Sstevel@tonic-gate# required for MS-CHAPv1. It is not needed in any normal system and 577c478bd9Sstevel@tonic-gate# is not built by default. 58734b6a94Sdarrenmmschap_test: mschap_test.o chap_ms.o 59eedefb95Sdarrenm $(LINK.c) -o mschap_test mschap_test.o chap_ms.o $(LDFLAGS) -lmd 607c478bd9Sstevel@tonic-gate @echo "Run with 'mschap_test 00000000000000000000000000000000 hello'" 617c478bd9Sstevel@tonic-gate @echo 627c478bd9Sstevel@tonic-gate @echo "Output should be:" 637c478bd9Sstevel@tonic-gate @echo 647c478bd9Sstevel@tonic-gate @echo " MS-CHAPv1 with LAN Manager -- 49 bytes:" 657c478bd9Sstevel@tonic-gate @echo " C9 CA EE 9B 1C A7 87 04" 667c478bd9Sstevel@tonic-gate @echo " 79 36 8C 55 AB 88 EC 5A" 677c478bd9Sstevel@tonic-gate @echo " 57 E9 A1 B7 95 40 C3 74" 687c478bd9Sstevel@tonic-gate @echo " F4 D9 9D AF 82 64 DC 3C" 697c478bd9Sstevel@tonic-gate @echo " 53 F9 BC 92 14 B5 5D 9E" 707c478bd9Sstevel@tonic-gate @echo " 78 C4 21 48 9D B7 A8 B4" 717c478bd9Sstevel@tonic-gate @echo " 01" 727c478bd9Sstevel@tonic-gate @echo " MS-CHAPv2 -- 49 bytes:" 737c478bd9Sstevel@tonic-gate @echo " xx xx xx xx xx xx xx xx" 747c478bd9Sstevel@tonic-gate @echo " xx xx xx xx xx xx xx xx" 757c478bd9Sstevel@tonic-gate @echo " 00 00 00 00 00 00 00 00" 767c478bd9Sstevel@tonic-gate @echo " xx xx xx xx xx xx xx xx" 777c478bd9Sstevel@tonic-gate @echo " xx xx xx xx xx xx xx xx" 787c478bd9Sstevel@tonic-gate @echo " xx xx xx xx xx xx xx xx" 797c478bd9Sstevel@tonic-gate @echo " 00" 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gateLINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 827c478bd9Sstevel@tonic-gateLINTFLAGS += -erroff=E_GLOBAL_COULD_BE_STATIC2 837c478bd9Sstevel@tonic-gateLINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gateSRCS= $(OBJS:%.o=%.c) 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate.PARALLEL: $(OBJS) 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate$(PROG): $(OBJS) 907c478bd9Sstevel@tonic-gate $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 917c478bd9Sstevel@tonic-gate $(POST_PROCESS) 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate$(ROOTPROG):= FILEMODE = 04555 947c478bd9Sstevel@tonic-gate$(ROOTPROG):= OWNER = root 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gateASPPP2PPPD= $(ROOTUSRSBIN)/asppp2pppd 977c478bd9Sstevel@tonic-gate$(ASPPP2PPPD):= OWNER=root 987c478bd9Sstevel@tonic-gate$(ASPPP2PPPD):= GROUP=bin 997c478bd9Sstevel@tonic-gate$(ASPPP2PPPD):= FILEMODE = 0550 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gateinstall: $(PROG) .WAIT $(SUBDIRS) $(ROOTPROG) $(ETCPPPDIR) $(ASPPP2PPPD) 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate$(ETCPPPDIR)/%: % 1047c478bd9Sstevel@tonic-gate $(INS.file) 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gate$(ETCPPPDIR): 1077c478bd9Sstevel@tonic-gate $(INS.dir) 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate$(SUBDIRS): FRC 1107c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gateFRC: 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gateLINTOBJS=$(OBJS:%.o=%.ln) 1157c478bd9Sstevel@tonic-gateCLOBBERFILES += $(LINTOBJS) 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gateclean: $(SUBDIRS) 1187c478bd9Sstevel@tonic-gate $(RM) $(OBJS) $(EXOBJS) 1197c478bd9Sstevel@tonic-gate 1207c478bd9Sstevel@tonic-gatesha1.ln:= LINTFLAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate# Not using the default lint target here so that we can disable 1237c478bd9Sstevel@tonic-gate# warnings per module as needed. 1247c478bd9Sstevel@tonic-gatelint: $(SUBDIRS) $(LINTOBJS) 1257c478bd9Sstevel@tonic-gate $(LINT.c) $(LINTOBJS) $(LDLIBS) 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gateclobber: $(SUBDIRS) 1287c478bd9Sstevel@tonic-gate 1297c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ 130