17c478bd9Sstevel@tonic-gate# 2f53eecf5SJames Carlson# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 37c478bd9Sstevel@tonic-gate# Use is subject to license terms. 47c478bd9Sstevel@tonic-gate# 57c478bd9Sstevel@tonic-gate# cmd/cmd-inet/usr.bin/pppd/Makefile 67c478bd9Sstevel@tonic-gate# 77c478bd9Sstevel@tonic-gate 87c478bd9Sstevel@tonic-gateinclude ../../../Makefile.cmd 97c478bd9Sstevel@tonic-gateinclude Makefile.def 107c478bd9Sstevel@tonic-gate 117c478bd9Sstevel@tonic-gatePROG= pppd 127c478bd9Sstevel@tonic-gateSUBDIRS= plugins 137c478bd9Sstevel@tonic-gateOBJS= auth.o ccp.o chap.o demand.o fsm.o ipcp.o ipv6cp.o \ 147c478bd9Sstevel@tonic-gate lcp.o magic.o main.o options.o sys-solaris.o upap.o utils.o \ 157c478bd9Sstevel@tonic-gate multilink.o cbcp.o 167c478bd9Sstevel@tonic-gate 177c478bd9Sstevel@tonic-gate# Object tdb.o used only for Multilink; not supported yet. 187c478bd9Sstevel@tonic-gate 197c478bd9Sstevel@tonic-gateall:= TARGET= all 207c478bd9Sstevel@tonic-gateinstall:= TARGET= install 217c478bd9Sstevel@tonic-gateclean:= TARGET= clean 227c478bd9Sstevel@tonic-gateclobber:= TARGET= clobber 237c478bd9Sstevel@tonic-gatelint:= TARGET= lint 247c478bd9Sstevel@tonic-gate 25fb60e41dSss150715LDLIBS += -lpam -lmd -lsocket -lnsl -ldlpi 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate# 287c478bd9Sstevel@tonic-gate# We need absolute path to /etc/ppp/plugins and /usr/lib/inet/ppp, not 297c478bd9Sstevel@tonic-gate# that of the proto area 307c478bd9Sstevel@tonic-gate# 317c478bd9Sstevel@tonic-gateLDFLAGS += -R$(ETCPPPPLUGINDIR_ABS) -R$(LIBPPPPLUGINDIR_ABS) 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gateCPPFLAGS += -DPLUGIN -DSVR4 -DSOL2 -DINET6 347c478bd9Sstevel@tonic-gateCPPFLAGS += -D_PATH_VARRUN='"/var/run/"' 357c478bd9Sstevel@tonic-gateCPPFLAGS += -DNEGOTIATE_FCS -DCBCP_SUPPORT -DALLOW_PAM -DHAS_SHADOW 367c478bd9Sstevel@tonic-gateCPPFLAGS += -DHAVE_MMAP -DCOMP_TUNE -DMUX_FRAME 377c478bd9Sstevel@tonic-gate$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gate.KEEP_STATE: 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gate.PARALLEL: $(SUBDIRS) 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gateall: $(PROG) $(SUBDIRS) 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gate# MS-CHAP support 46eedefb95SdarrenmCPPFLAGS += -DHAVE_CRYPT_H -DUSE_CRYPT -DHAVE_LIBMD 477c478bd9Sstevel@tonic-gateCPPFLAGS += -DCHAPMS -DMSLANMAN 487c478bd9Sstevel@tonic-gateCPPFLAGS += -DCHAPMSV2 49734b6a94SdarrenmOBJS += chap_ms.o 507c478bd9Sstevel@tonic-gateEXOBJS += mschap_test.o 517c478bd9Sstevel@tonic-gateCLOBBERFILES += mschap_test 527c478bd9Sstevel@tonic-gate 53*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized 54*7014882cSRichard Lowe 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_DEF_NOT_USED2 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gateSRCS= $(OBJS:%.o=%.c) 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gate.PARALLEL: $(OBJS) 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate$(PROG): $(OBJS) 887c478bd9Sstevel@tonic-gate $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 897c478bd9Sstevel@tonic-gate $(POST_PROCESS) 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gate$(ROOTPROG):= FILEMODE = 04555 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gateASPPP2PPPD= $(ROOTUSRSBIN)/asppp2pppd 947c478bd9Sstevel@tonic-gate$(ASPPP2PPPD):= FILEMODE = 0550 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gateinstall: $(PROG) .WAIT $(SUBDIRS) $(ROOTPROG) $(ETCPPPDIR) $(ASPPP2PPPD) 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gate$(ETCPPPDIR)/%: % 997c478bd9Sstevel@tonic-gate $(INS.file) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gate$(ETCPPPDIR): 1027c478bd9Sstevel@tonic-gate $(INS.dir) 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gate$(SUBDIRS): FRC 1057c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gateFRC: 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gateLINTOBJS=$(OBJS:%.o=%.ln) 1107c478bd9Sstevel@tonic-gateCLOBBERFILES += $(LINTOBJS) 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gateclean: $(SUBDIRS) 1137c478bd9Sstevel@tonic-gate $(RM) $(OBJS) $(EXOBJS) 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gatesha1.ln:= LINTFLAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gate# Not using the default lint target here so that we can disable 1187c478bd9Sstevel@tonic-gate# warnings per module as needed. 1197c478bd9Sstevel@tonic-gatelint: $(SUBDIRS) $(LINTOBJS) 1207c478bd9Sstevel@tonic-gate $(LINT.c) $(LINTOBJS) $(LDLIBS) 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gateclobber: $(SUBDIRS) 1237c478bd9Sstevel@tonic-gate 1247c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ 125