1# $FreeBSD$ 2# 3# Doing a make install builds /usr/share/examples 4 5.include <src.opts.mk> 6 7PACKAGE=examples 8FILESDIR= ${SHAREDIR}/examples 9 10LDIRS= BSD_daemon \ 11 FreeBSD_version \ 12 IPv6 \ 13 bootforth \ 14 csh \ 15 diskless \ 16 drivers \ 17 etc \ 18 find_interface \ 19 ibcs2 \ 20 indent \ 21 ipfw \ 22 jails \ 23 kld \ 24 libvgl \ 25 mdoc \ 26 netgraph \ 27 perfmon \ 28 ppi \ 29 ppp \ 30 printing \ 31 ses \ 32 scsi_target \ 33 sunrpc \ 34 ypldap 35 36 37SE_DIRS+= BSD_daemon 38SE_BSD_DAEMON= \ 39 FreeBSD.pfa \ 40 README \ 41 beastie.eps \ 42 beastie.fig \ 43 eps.patch \ 44 poster.sh 45 46.if ${MACHINE_CPUARCH} == "amd64" 47.if ${MK_BHYVE} != "no" 48LDIRS+= bhyve 49SE_DIRS+= bhyve 50SE_BHYVE= vmrun.sh 51PACKAGE_bhyve/vmrun.sh= bhyve 52.endif 53.endif 54 55SE_DIRS+= FreeBSD_version 56SE_FREEBSD_VERSION= \ 57 FreeBSD_version.c \ 58 Makefile \ 59 README 60 61SE_DIRS+= IPv6 62SE_IPV6= USAGE 63 64SE_DIRS+= bootforth 65SE_BOOTFORTH= \ 66 README \ 67 boot.4th \ 68 frames.4th \ 69 loader.rc \ 70 menu.4th \ 71 menuconf.4th \ 72 screen.4th 73 74SE_DIRS+= csh 75SE_CSH= dot.cshrc 76 77SE_DIRS+= diskless 78SE_DISKLESS= \ 79 ME \ 80 README.BOOTP \ 81 README.TEMPLATING \ 82 clone_root 83 84SE_DIRS+= drivers 85SE_DRIVERS= \ 86 README \ 87 make_device_driver.sh \ 88 make_pseudo_driver.sh 89 90SE_DIRS+= etc 91SE_ETC= \ 92 README.examples \ 93 bsd-style-copyright \ 94 make.conf 95 96SE_DIRS+= find_interface 97SE_FIND_INTERFACE= \ 98 Makefile \ 99 README \ 100 find_interface.c 101 102SE_DIRS+= ibcs2 103SE_IBCS2= \ 104 README \ 105 hello.uu 106 107SE_DIRS+= indent 108SE_INDENT= indent.pro 109 110.if ${MK_IPFILTER} != "no" 111SUBDIR+= ipfilter 112.endif 113 114SE_DIRS+= ipfw 115SE_IPFW= change_rules.sh 116 117SE_DIRS+= jails 118SE_JAILS= \ 119 README \ 120 VIMAGE \ 121 jail.xxx.conf \ 122 jib \ 123 jng \ 124 rc.conf.jails \ 125 rcjail.xxx.conf 126 127SE_DIRS+= kld 128SE_KLD= Makefile 129 130SE_DIRS+= kld/cdev 131SE_KLD_CDEV= \ 132 Makefile \ 133 README \ 134 135SE_DIRS+= kld/cdev/module 136SE_KLD_CDEV_MODULE= \ 137 Makefile \ 138 cdev.c \ 139 cdev.h \ 140 cdevmod.c 141 142SE_DIRS+= kld/cdev/test 143SE_KLD_CDEV_TEST= \ 144 Makefile \ 145 testcdev.c 146 147SE_DIRS+= kld/dyn_sysctl 148SE_KLD_DYN_SYSCTL= \ 149 Makefile \ 150 README \ 151 dyn_sysctl.c 152 153SE_DIRS+= kld/firmware 154SE_KLD_FIRMWARE= \ 155 Makefile \ 156 README 157 158SE_DIRS+= kld/firmware/fwconsumer 159SE_KLD_FIRMWARE_FWCONSUMER= \ 160 Makefile \ 161 fw_consumer.c 162 163SE_DIRS+= kld/firmware/fwimage 164SE_KLD_FIRMWARE_FWIMAGE= \ 165 Makefile \ 166 firmware.img.uu 167 168SE_DIRS+= kld/khelp 169SE_KLD_KHELP= \ 170 Makefile \ 171 README \ 172 h_example.c 173 174SE_DIRS+= kld/syscall 175SE_KLD_SYSCALL= Makefile 176 177SE_DIRS+= kld/syscall/module 178SE_KLD_SYSCALL_MODULE= \ 179 Makefile \ 180 syscall.c 181 182SE_DIRS+= kld/syscall/test 183SE_KLD_SYSCALL_TEST= \ 184 Makefile \ 185 call.c 186 187SE_DIRS+= libvgl 188SE_LIBVGL= \ 189 Makefile \ 190 demo.c 191 192SE_DIRS+= mdoc 193SE_MDOC= \ 194 POSIX-copyright \ 195 deshallify.sh \ 196 example.1 \ 197 example.3 \ 198 example.4 \ 199 example.9 200 201SE_DIRS+= netgraph 202SE_NETGRAPH= \ 203 ether.bridge \ 204 frame_relay \ 205 ngctl \ 206 raw \ 207 udp.tunnel \ 208 virtual.chain \ 209 virtual.lan \ 210 211SE_DIRS+= perfmon 212SE_PERFMON= \ 213 Makefile \ 214 README \ 215 perfmon.c \ 216 217.if ${MK_PF} != "no" 218SE_DIRS+= pf 219SE_PF= \ 220 ackpri \ 221 faq-example1 \ 222 faq-example2 \ 223 faq-example3 \ 224 pf.conf \ 225 queue1 \ 226 queue2 \ 227 queue3 \ 228 queue4 \ 229 spamd 230.endif 231 232SE_DIRS+= ppi 233SE_PPI= \ 234 Makefile \ 235 ppilcd.c 236 237SE_DIRS+= ppp 238SE_PPP= \ 239 chap-auth \ 240 login-auth \ 241 ppp.conf.sample \ 242 ppp.conf.span-isp \ 243 ppp.conf.span-isp.working \ 244 ppp.linkdown.sample \ 245 ppp.linkdown.span-isp \ 246 ppp.linkdown.span-isp.working \ 247 ppp.linkup.sample \ 248 ppp.linkup.span-isp \ 249 ppp.linkup.span-isp.working \ 250 ppp.secret.sample \ 251 ppp.secret.span-isp \ 252 ppp.secret.span-isp.working 253 254SE_DIRS+= printing 255SE_PRINTING= \ 256 diablo-if-net \ 257 hpdf \ 258 hpif \ 259 hpof \ 260 hprf \ 261 hpvf \ 262 if-simple \ 263 if-simpleX \ 264 ifhp \ 265 make-ps-header \ 266 netprint \ 267 psdf \ 268 psdfX \ 269 psif \ 270 pstf \ 271 pstfX 272 273SE_DIRS+= ses 274SE_SES= \ 275 Makefile \ 276 Makefile.inc 277 278SE_DIRS+= ses/getencstat 279SE_SES_GETENCSTAT= \ 280 Makefile \ 281 getencstat.0 282 283SE_DIRS+= ses/sesd 284SE_SES_SESD= \ 285 Makefile \ 286 sesd.0 287 288SE_DIRS+= ses/setencstat 289SE_SES_SETENCSTAT= \ 290 Makefile \ 291 setencstat.0 292 293SE_DIRS+= ses/setobjstat 294SE_SES_SETOBJSTAT= \ 295 Makefile \ 296 setobjstat.0 297 298SE_DIRS+= ses/srcs 299SE_SES_SRCS= \ 300 chpmon.c \ 301 eltsub.c \ 302 eltsub.h \ 303 getencstat.c \ 304 getnobj.c \ 305 getobjmap.c \ 306 getobjstat.c \ 307 inienc.c \ 308 sesd.c \ 309 setencstat.c \ 310 setobjstat.c 311 312SE_DIRS+= scsi_target 313SE_SCSI_TARGET= \ 314 Makefile \ 315 scsi_target.c \ 316 scsi_target.h \ 317 scsi_target.8 \ 318 scsi_cmds.c 319 320SE_DIRS+= sunrpc 321SE_SUNRPC= Makefile 322 323SE_DIRS+= sunrpc/dir 324SE_SUNRPC_DIR= \ 325 Makefile \ 326 dir.x \ 327 dir_proc.c \ 328 rls.c 329 330SE_DIRS+= sunrpc/msg 331SE_SUNRPC_MSG= \ 332 Makefile \ 333 msg.x \ 334 msg_proc.c \ 335 printmsg.c \ 336 rprintmsg.c 337 338SE_DIRS+= sunrpc/sort 339SE_SUNRPC_SORT= \ 340 Makefile \ 341 rsort.c \ 342 sort.x \ 343 sort_proc.c 344 345.if ${MK_EFI} != "no" 346LDIRS+= uefisign 347SE_DIRS+= uefisign 348SE_UEFISIGN= uefikeys 349.endif 350 351SE_DIRS+= ypldap 352SE_YPLDAP= ypldap.conf 353 354.if ${MK_HAST} != "no" 355LDIRS+= hast 356SE_DIRS+= hast 357SE_HAST= ucarp.sh \ 358 ucarp_down.sh \ 359 ucarp_up.sh \ 360 vip-down.sh \ 361 vip-up.sh 362.endif 363 364.if ${MK_USB} != "no" 365LDIRS+= libusb20 366SE_DIRS+= libusb20 367SE_LIBUSB20= \ 368 Makefile \ 369 README \ 370 util.c \ 371 util.h \ 372 bulk.c \ 373 control.c 374.endif 375 376 377# Setup the FILES_GROUPS for all DIRS variables above. 378# The variables are prefixed by 'SE_' to prevent variable collision in 379# other parts of the system 380.for d in ${SE_DIRS} 381.for f in ${SE_${d:tu:C/\//_/g}} 382SER_${d:tu:C/\//_/g}+= ${d}/${f} 383.endfor 384FILESGROUPS+= SER_${d:tu:C/\//_/g} 385SER_${d:tu:C/\//_/g}DIR+= ${SHAREDIR}/examples/${d} 386.endfor 387 388BINDIR= ${SHAREDIR}/examples 389 390beforeinstall: copies etc-examples 391META_TARGETS+= copies 392.ORDER: etc-examples 393 394copies: 395.for i in ${LDIRS} 396 if [ -L ${DESTDIR}${BINDIR}/$i ]; then \ 397 rm -f ${DESTDIR}${BINDIR}/$i; \ 398 fi 399.endfor 400 401etc-examples: 402 ${_+_}(cd ${SRCTOP}/etc; ${MAKE} etc-examples) 403 404SUBDIR+= smbfs 405 406HAS_TESTS= 407SUBDIR.${MK_TESTS}+= tests 408 409SUBDIR_PARALLEL= 410 411.include <bsd.prog.mk> 412