-CC = gcc
-CFLAGS = -g -O2 -I.. -I../../include -D_linux_=1 -fPIC
-LDFLAGS = -shared
-INSTALL = install -o root
-
-SUBDIRS = pppoe
-PLUGINS = minconn.so passprompt.so
+#CC = gcc
+COPTS = -O2 -g
+CFLAGS = $(COPTS) -I.. -I../../include -fPIC
+LDFLAGS_SHARED = -shared
+INSTALL = install
+
+# EAP-TLS
+CFLAGS += -DUSE_EAPTLS=1
+
+DESTDIR = $(INSTROOT)@DESTDIR@
+BINDIR = $(DESTDIR)/sbin
+MANDIR = $(DESTDIR)/share/man/man8
+LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
+
+SUBDIRS := rp-pppoe pppoatm pppol2tp
+# Uncomment the next line to include the radius authentication plugin
+SUBDIRS += radius
+PLUGINS := minconn.so passprompt.so passwordfd.so winbind.so
+
+# This setting should match the one in ../Makefile.linux
+MPPE=y
+
+ifdef MPPE
+CFLAGS += -DMPPE=1
+endif