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 oss.h \ 327 poll.c \ 328 select.c \ 329 simple.c \ 330 sndstat_nv.c 331 332SE_DIRS+= sunrpc 333SE_SUNRPC= Makefile 334 335SE_DIRS+= sunrpc/dir 336SE_SUNRPC_DIR= \ 337 Makefile \ 338 dir.x \ 339 dir_proc.c \ 340 rls.c 341 342SE_DIRS+= sunrpc/msg 343SE_SUNRPC_MSG= \ 344 Makefile \ 345 msg.x \ 346 msg_proc.c \ 347 printmsg.c \ 348 rprintmsg.c 349 350SE_DIRS+= sunrpc/sort 351SE_SUNRPC_SORT= \ 352 Makefile \ 353 rsort.c \ 354 sort.x \ 355 sort_proc.c 356 357.if ${MK_EFI} != "no" 358LDIRS+= uefisign 359SE_DIRS+= uefisign 360SE_UEFISIGN= uefikeys 361SE_UEFISIGNPACKAGE=efi-tools 362.endif 363 364SE_DIRS+= ypldap 365SE_YPLDAP= ypldap.conf 366SE_YPLDAPPACKAGE=yp 367 368.if ${MK_HAST} != "no" 369LDIRS+= hast 370SE_HASTPACKAGE= hast 371SE_DIRS+= hast 372SE_HAST= ucarp.sh \ 373 ucarp_down.sh \ 374 ucarp_up.sh \ 375 vip-down.sh \ 376 vip-up.sh 377.endif 378 379.if ${MK_USB} != "no" 380LDIRS+= libusb20 381SE_DIRS+= libusb20 382SE_LIBUSB20= \ 383 Makefile \ 384 README \ 385 util.c \ 386 util.h \ 387 bulk.c \ 388 control.c 389.endif 390 391 392# Setup the FILES_GROUPS for all DIRS variables above. 393# The variables are prefixed by 'SE_' to prevent variable collision in 394# other parts of the system 395.for d in ${SE_DIRS} 396.for f in ${SE_${d:tu:C/\//_/g}} 397SER_${d:tu:C/\//_/g}+= ${d}/${f} 398.endfor 399FILESGROUPS+= SER_${d:tu:C/\//_/g} 400SER_${d:tu:C/\//_/g}DIR+= ${SHAREDIR}/examples/${d} 401.if ${SE_${d:tu:C/\//_/g}PACKAGE:U} != "" 402SER_${d:tu:C/\//_/g}PACKAGE= ${SE_${d:tu:C/\//_/g}PACKAGE} 403.else 404SER_${d:tu:C/\//_/g}PACKAGE= examples 405.endif 406.endfor 407 408BINDIR= ${SHAREDIR}/examples 409 410beforeinstall: copies 411META_TARGETS+= copies 412 413copies: 414.for i in ${LDIRS} 415 if [ -L ${DESTDIR}${BINDIR}/$i ]; then \ 416 rm -f ${DESTDIR}${BINDIR}/$i; \ 417 fi 418.endfor 419 420SUBDIR+= smbfs 421 422HAS_TESTS= 423SUBDIR.${MK_TESTS}+= tests 424 425SUBDIR_PARALLEL= 426 427.include <bsd.prog.mk> 428