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