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