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