-# $FreeBSD: src/sys/modules/if_ef/Makefile,v 1.2.2.2 2001/04/25 11:24:03 ru Exp $
+# $FreeBSD: src/sys/modules/if_ef/Makefile,v 1.16 2009/06/08 19:57:35 bz Exp $
-KMOD= if_ef
-SRCS= if_ef.c opt_ipx.h opt_inet.h opt_ef.h
-
-# If you need only limited number of frames comment out unneeded ones
-# this will reduce number of visible devices
-ETHER_II=
-ETHER_8023=
-ETHER_8022=
-ETHER_SNAP=
+KMOD= if_ef
+SRCS= if_ef.c opt_ipx.h opt_inet.h opt_ef.h
.if defined(EFDEBUG)
CFLAGS+= -DEF_DEBUG
.endif
.if !defined(BUILDING_WITH_KERNEL)
+# If you need only a limited number of frames, uncomment the needed ones.
+# This will reduce the number of visible devices. Note that the module
+# will support all frames by default, i.e., when all are commented here.
+#ETHER_II=
+#ETHER_8023=
+#ETHER_8022=
+#ETHER_SNAP=
+
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_ipx.h:
echo "#define IPX 1" > ${.TARGET}
-.endif
opt_ef.h:
+ :> ${.TARGET}
.for frame in ETHER_II ETHER_8023 ETHER_8022 ETHER_SNAP
.if defined(${frame})
echo "#define ${frame} 1" >> ${.TARGET}
.endif
.endfor
+.endif
.include <bsd.kmod.mk>
#include <netproto/ipx/ipx_if.h>
#endif
+/* If none of the supported layers is enabled explicitly enable them all */
+#if !defined(ETHER_II) && !defined(ETHER_8023) && !defined(ETHER_8022) && \
+ !defined(ETHER_SNAP)
+#define ETHER_II 1
+#define ETHER_8023 1
+#define ETHER_8022 1
+#define ETHER_SNAP 1
+#endif
+
/* internal frame types */
#define ETHER_FT_EII 0 /* Ethernet_II - default */
#define ETHER_FT_8023 1 /* 802.3 (Novell) */