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