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 etc \ 14 find_interface \ 15 flua \ 16 indent \ 17 inotify \ 18 ipfw \ 19 jails \ 20 kld \ 21 libvgl \ 22 mdoc \ 23 netgraph \ 24 oci \ 25 perfmon \ 26 ppi \ 27 ppp \ 28 printing \ 29 ses \ 30 scsi_target \ 31 sound \ 32 sunrpc \ 33 ypldap 34 35 36SE_DIRS+= BSD_daemon 37SE_BSD_DAEMON= \ 38 FreeBSD.pfa \ 39 README \ 40 beastie.eps \ 41 beastie.fig \ 42 eps.patch \ 43 poster.sh 44 45.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "aarch64" 46.if ${MK_BHYVE} != "no" 47LDIRS+= bhyve 48SE_DIRS+= bhyve 49SE_BHYVEPACKAGE=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+= bootforth 62SE_BOOTFORTH_PACKAGE=bootloader 63SE_BOOTFORTH= \ 64 README \ 65 boot.4th \ 66 frames.4th \ 67 loader.rc \ 68 menu.4th \ 69 menuconf.4th \ 70 screen.4th 71 72SE_DIRS+= csh 73SE_CSHPACKAGE= csh 74SE_CSH= dot.cshrc 75 76SE_DIRS+= etc 77SE_ETC= \ 78 README.examples \ 79 bsd-style-copyright \ 80 make.conf 81 82SE_DIRS+= find_interface 83SE_FIND_INTERFACE= \ 84 Makefile \ 85 README \ 86 find_interface.c 87 88SE_DIRS+= flua 89SE_FLUA= libjail.lua 90 91SE_DIRS+= indent 92SE_INDENT= indent.pro 93 94SE_DIRS+= inotify 95SE_INOTIFY= inotify.c \ 96 Makefile 97 98.if ${MK_IPFILTER} != "no" 99SUBDIR+= ipfilter 100.endif 101 102SE_DIRS+= ipfw 103SE_IPFWPACKAGE= ipfw 104SE_IPFW= change_rules.sh 105 106SE_DIRS+= jails 107SE_JAILPACKAGE= jail 108SE_JAILS= \ 109 README \ 110 VIMAGE \ 111 jail.xxx.conf \ 112 jib \ 113 jng \ 114 rc.conf.jails \ 115 rcjail.xxx.conf 116 117SE_DIRS+= kld 118SE_KLD= Makefile 119 120SE_DIRS+= kld/cdev 121SE_KLD_CDEV= \ 122 Makefile \ 123 README \ 124 125SE_DIRS+= kld/cdev/module 126SE_KLD_CDEV_MODULE= \ 127 Makefile \ 128 cdev.c \ 129 cdev.h \ 130 cdevmod.c 131 132SE_DIRS+= kld/cdev/test 133SE_KLD_CDEV_TEST= \ 134 Makefile \ 135 testcdev.c 136 137SE_DIRS+= kld/dyn_sysctl 138SE_KLD_DYN_SYSCTL= \ 139 Makefile \ 140 README \ 141 dyn_sysctl.c 142 143SE_DIRS+= kld/firmware 144SE_KLD_FIRMWARE= \ 145 Makefile \ 146 README 147 148SE_DIRS+= kld/firmware/fwconsumer 149SE_KLD_FIRMWARE_FWCONSUMER= \ 150 Makefile \ 151 fw_consumer.c 152 153SE_DIRS+= kld/firmware/fwimage 154SE_KLD_FIRMWARE_FWIMAGE= \ 155 Makefile \ 156 firmware.img.uu 157 158SE_DIRS+= kld/khelp 159SE_KLD_KHELP= \ 160 Makefile \ 161 README \ 162 h_example.c 163 164SE_DIRS+= kld/syscall 165SE_KLD_SYSCALL= Makefile 166 167SE_DIRS+= kld/syscall/module 168SE_KLD_SYSCALL_MODULE= \ 169 Makefile \ 170 syscall.c 171 172SE_DIRS+= kld/syscall/test 173SE_KLD_SYSCALL_TEST= \ 174 Makefile \ 175 call.c 176 177SE_DIRS+= libvgl 178SE_LIBVGL= \ 179 Makefile \ 180 demo.c 181 182SE_DIRS+= mdoc 183SE_MDOC= \ 184 POSIX-copyright \ 185 deshallify.sh \ 186 example.1 \ 187 example.3 \ 188 example.4 \ 189 example.9 190 191SE_DIRS+= netgraph 192SE_NETGRAPH= \ 193 ether.bridge \ 194 frame_relay \ 195 ngctl \ 196 raw \ 197 udp.tunnel \ 198 virtual.chain \ 199 virtual.lan \ 200 201SE_DIRS+= oci 202SE_OCI= \ 203 README \ 204 Containerfile.pkg 205 206SE_DIRS+= perfmon 207SE_PERFMON= \ 208 Makefile \ 209 README \ 210 perfmon.c \ 211 212.if ${MK_PF} != "no" 213SE_DIRS+= pf 214.if ${MK_STAGING} == "no" 215SE_PFPACKAGE= pf 216SE_PF= \ 217 ackpri \ 218 faq-example1 \ 219 faq-example2 \ 220 faq-example3 \ 221 pf.conf \ 222 queue1 \ 223 queue2 \ 224 queue3 \ 225 queue4 \ 226 spamd 227.endif 228.endif 229 230SE_DIRS+= ppi 231SE_PPI= \ 232 Makefile \ 233 ppilcd.c 234 235SE_DIRS+= ppp 236SE_PPPPACKAGE= ppp 237SE_PPP= \ 238 chap-auth \ 239 login-auth \ 240 ppp.conf.sample \ 241 ppp.conf.span-isp \ 242 ppp.conf.span-isp.working \ 243 ppp.linkdown.sample \ 244 ppp.linkdown.span-isp \ 245 ppp.linkdown.span-isp.working \ 246 ppp.linkup.sample \ 247 ppp.linkup.span-isp \ 248 ppp.linkup.span-isp.working \ 249 ppp.secret.sample \ 250 ppp.secret.span-isp \ 251 ppp.secret.span-isp.working 252 253SE_DIRS+= printing 254SE_PRINTINGPACKAGE=lp 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+= sound 321SE_SOUND= \ 322 sndstat_nv.c \ 323 midi.c 324 325SE_DIRS+= sound/oss 326SE_SOUND_OSS= \ 327 README \ 328 audio.c 329 330SE_DIRS+= sunrpc 331SE_SUNRPC= Makefile 332 333SE_DIRS+= sunrpc/dir 334SE_SUNRPC_DIR= \ 335 Makefile \ 336 dir.x \ 337 dir_proc.c \ 338 rls.c 339 340SE_DIRS+= sunrpc/msg 341SE_SUNRPC_MSG= \ 342 Makefile \ 343 msg.x \ 344 msg_proc.c \ 345 printmsg.c \ 346 rprintmsg.c 347 348SE_DIRS+= sunrpc/sort 349SE_SUNRPC_SORT= \ 350 Makefile \ 351 rsort.c \ 352 sort.x \ 353 sort_proc.c 354 355.if ${MK_EFI} != "no" 356LDIRS+= uefisign 357SE_DIRS+= uefisign 358SE_UEFISIGN= uefikeys 359SE_UEFISIGNPACKAGE=efi-tools 360.endif 361 362SE_DIRS+= ypldap 363SE_YPLDAP= ypldap.conf 364SE_YPLDAPPACKAGE=yp 365 366.if ${MK_HAST} != "no" 367LDIRS+= hast 368SE_HASTPACKAGE= hast 369SE_DIRS+= hast 370SE_HAST= ucarp.sh \ 371 ucarp_down.sh \ 372 ucarp_up.sh \ 373 vip-down.sh \ 374 vip-up.sh 375.endif 376 377.if ${MK_USB} != "no" 378LDIRS+= libusb20 379SE_DIRS+= libusb20 380SE_LIBUSB20= \ 381 Makefile \ 382 README \ 383 util.c \ 384 util.h \ 385 bulk.c \ 386 control.c 387.endif 388 389 390# Setup the FILES_GROUPS for all DIRS variables above. 391# The variables are prefixed by 'SE_' to prevent variable collision in 392# other parts of the system 393.for d in ${SE_DIRS} 394.for f in ${SE_${d:tu:C/\//_/g}} 395SER_${d:tu:C/\//_/g}+= ${d}/${f} 396.endfor 397FILESGROUPS+= SER_${d:tu:C/\//_/g} 398SER_${d:tu:C/\//_/g}DIR+= ${SHAREDIR}/examples/${d} 399.if ${SE_${d:tu:C/\//_/g}PACKAGE:U} != "" 400SER_${d:tu:C/\//_/g}PACKAGE= ${SE_${d:tu:C/\//_/g}PACKAGE} 401.else 402SER_${d:tu:C/\//_/g}PACKAGE= examples 403.endif 404.endfor 405 406BINDIR= ${SHAREDIR}/examples 407 408beforeinstall: copies 409META_TARGETS+= copies 410 411copies: 412.for i in ${LDIRS} 413 if [ -L ${DESTDIR}${BINDIR}/$i ]; then \ 414 rm -f ${DESTDIR}${BINDIR}/$i; \ 415 fi 416.endfor 417 418SUBDIR+= smbfs 419 420HAS_TESTS= 421SUBDIR.${MK_TESTS}+= tests 422 423SUBDIR_PARALLEL= 424 425.include <bsd.prog.mk> 426