# CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2011, Richard Lowe # Copyright (c) 2012 by Delphix. All rights reserved. # Copyright (c) 2012, Igor Kozhukhov # Copyright 2012 OmniTI Computer Consulting, Inc. All rights reserved. # Copyright 2022 Garrett D'Amore # Copyright 2016 Hans Rosenfeld # Copyright 2017 Nexenta Systems, Inc. # Copyright 2017 RackTop Systems. # Copyright 2022 OmniOS Community Edition (OmniOSce) Association. # Copyright 2020 Joyent, Inc. # # # It is easier to think in terms of directory names without the ROOT macro # prefix. ROOTDIRS is TARGETDIRS with ROOT prefixes. It is necessary # to work with ROOT prefixes when controlling conditional assignments. # DIRLINKS= $(SYM.DIRS) # Hammerhead: GNU Make conditional (was dmake $(BUILD64) prefix syntax) ifneq ($(BUILD64),$(POUND_SIGN)) DIRLINKS += $(SYM.DIRS64) endif TARGETDIRS= $(DIRS) # Hammerhead: GNU Make conditional (was dmake $(BUILD64) prefix syntax) ifneq ($(BUILD64),$(POUND_SIGN)) TARGETDIRS += $(DIRS64) endif TARGETDIRS += $(FILELINKS) $(DIRLINKS) i386_DIRS= \ /boot/acpi \ /boot/acpi/tables \ /boot/grub \ /boot/grub/bin \ /platform/amd64 \ /lib/libmvec \ /usr/lib/xen \ /usr/lib/xen/bin \ /usr/share/bhyve sparc_DIRS= \ /usr/lib/ldoms sparc_64ONLY= $(POUND_SIGN) 64ONLY= $($(MACH)_64ONLY) # Hammerhead: UCB removed, MACH32_DIRS no longer needed MACH32_DIRS= # Hammerhead: PYTHON3_DIRS removed along with pysolaris + pyzfs (no Python # bindings shipped in base proto; Python is a Layer-2 coral package only). DIRS= \ /boot \ /boot/solaris \ /boot/solaris/bin \ $($(MACH)_DIRS) \ /dev \ /dev/dsk \ /dev/fd \ /dev/ipnet \ /dev/net \ /dev/rdsk \ /dev/rmt \ /dev/pts \ /dev/sad \ /dev/swap \ /dev/term \ /dev/vt \ /dev/zcons \ /devices \ /devices/pseudo \ /etc \ /etc/brand \ /etc/brand/solaris10 \ /etc/coral \ /etc/cron.d \ /etc/crypto \ /etc/crypto/certs \ /etc/crypto/crls \ /etc/default \ /etc/devices \ /etc/dev \ /etc/dfs \ /etc/dladm \ /etc/fs \ /etc/fs/nfs \ /etc/fs/zfs \ /etc/ipadm \ /etc/iscsi \ /etc/rpcsec \ /etc/security \ /etc/security/auth_attr.d \ /etc/security/exec_attr.d \ /etc/security/prof_attr.d \ /etc/security/tsol \ /etc/gss \ /etc/dhcp \ /etc/lib \ /etc/opt \ /etc/reef \ /etc/sasl \ /etc/skel \ /etc/svc \ /etc/svc/profile \ /etc/svc/profile/site \ /etc/svc/volatile \ /etc/system.d \ /etc/usb \ /etc/user_attr.d \ /etc/zfs \ /etc/zones \ /home \ /lib \ /lib/crypto \ /lib/inet \ /lib/fm \ /lib/secure \ /lib/svc \ /lib/svc/bin \ /lib/svc/capture \ /lib/svc/manifest \ /lib/svc/manifest/milestone \ /lib/svc/manifest/device \ /lib/svc/manifest/system \ /lib/svc/manifest/system/device \ /lib/svc/manifest/system/filesystem \ /lib/svc/manifest/system/security \ /lib/svc/manifest/system/svc \ /lib/svc/manifest/network \ /lib/svc/manifest/network/dns \ /lib/svc/manifest/network/ipsec \ /lib/svc/manifest/network/ldap \ /lib/svc/manifest/network/nfs \ /lib/svc/manifest/network/nis \ /lib/svc/manifest/network/rpc \ /lib/svc/manifest/network/security \ /lib/svc/manifest/network/shares \ /lib/svc/manifest/application \ /lib/svc/manifest/application/management \ /lib/svc/manifest/application/security \ /lib/svc/manifest/application/print \ /lib/svc/manifest/platform \ /lib/svc/manifest/platform/sun4u \ /lib/svc/manifest/platform/sun4v \ /lib/svc/manifest/site \ /lib/svc/method \ /lib/svc/monitor \ /lib/svc/seed \ /lib/svc/share \ /kernel \ /kernel/firmware \ /opt \ /platform \ /proc \ /root \ /bin \ /sbin \ /system \ /system/boot \ /system/contract \ /system/object \ /tmp \ /usr \ /usr/bin \ /usr/local \ /usr/local/bin \ /usr/local/lib \ /usr/local/sbin \ /usr/local/share \ /usr/local/etc \ /usr/local/include \ /usr/bin/$(MACH32) \ /usr/ccs \ /usr/ccs/bin \ /usr/ccs/lib \ /usr/demo \ /usr/demo/SOUND \ /usr/include \ /usr/include/ads \ /usr/include/ast \ /usr/include/fm \ /usr/include/gssapi \ /usr/include/kerberosv5 \ /usr/include/libmilter \ /usr/include/sasl \ /usr/include/scsi \ /usr/include/security \ /usr/include/sys/crypto \ /usr/include/tsol \ /usr/lib \ /usr/lib/abi \ /usr/lib/brand \ /usr/lib/brand/ipkg \ /usr/lib/brand/labeled \ /usr/lib/brand/shared \ /usr/lib/brand/sn1 \ /usr/lib/brand/solaris10 \ /usr/lib/class \ /usr/lib/class/FSS \ /usr/lib/class/FX \ /usr/lib/class/IA \ /usr/lib/class/RT \ /usr/lib/class/SDC \ /usr/lib/class/TS \ /usr/lib/crypto \ /usr/lib/elfedit \ /usr/lib/fm \ /usr/lib/font \ /usr/lib/fs \ /usr/lib/fs/nfs \ /usr/lib/fs/proc \ /usr/lib/fs/smb \ /usr/lib/fs/zfs \ /usr/lib/gss \ /usr/lib/inet \ /usr/lib/inet/ilb \ /usr/lib/krb5 \ /usr/lib/link_audit \ /usr/lib/locale \ /usr/lib/locale/C \ /usr/lib/locale/C/LC_COLLATE \ /usr/lib/locale/C/LC_CTYPE \ /usr/lib/locale/C/LC_MESSAGES \ /usr/lib/locale/C/LC_MONETARY \ /usr/lib/locale/C/LC_NUMERIC \ /usr/lib/locale/C/LC_TIME \ /usr/lib/lwp \ /usr/lib/mdb \ /usr/lib/mdb/kvm \ /usr/lib/mdb/proc \ /usr/lib/nfs \ /usr/lib/varpd \ /usr/lib/pool \ /usr/lib/reef \ /usr/lib/rcap \ /usr/lib/rcap/$(MACH32) \ /usr/lib/sa \ /usr/lib/sasl \ /usr/lib/scsi \ /usr/lib/secure \ /usr/lib/security \ /usr/lib/smbsrv \ /usr/lib/vscan \ /usr/lib/zfs \ /usr/lib/zones \ /usr/platform \ /usr/sbin \ /usr/sbin/$(MACH32) \ /usr/share \ /usr/share/applications \ /usr/share/audio \ /usr/share/audio/samples \ /usr/share/audio/samples/au \ /usr/share/hwdata \ /usr/share/lib \ /usr/share/lib/ccs \ /usr/share/lib/tmac \ /usr/share/lib/ldif \ /usr/share/lib/xml \ /usr/share/lib/xml/dtd \ /usr/share/man \ /usr/share/src \ /usr/xpg4 \ /usr/xpg4/bin \ /usr/xpg4/include \ /usr/xpg4/lib \ /usr/xpg6 \ /usr/xpg6/bin \ /var \ /var/adm \ /var/adm/exacct \ /var/adm/log \ /var/adm/pool \ /var/adm/sa \ /var/adm/streams \ /var/cores \ /var/cron \ /var/db \ /var/db/ipf \ /var/idmap \ /var/krb5 \ /var/krb5/rcache \ /var/krb5/rcache/root \ /var/ld \ /var/lib \ /var/lib/coral \ /var/lib/coral/installed \ /var/lib/coral/packages \ /var/lib/coral/sources \ /var/lib/coral/trusted-keys \ /var/log \ /var/log/pool \ /var/logadm \ /var/opt \ /var/preserve \ /var/run \ /var/smb \ /var/smb/cvol \ /var/smb/cvol/windows \ /var/smb/cvol/windows/system32 \ /var/smb/cvol/windows/system32/vss \ /var/spool \ /var/spool/cron \ /var/spool/cron/atjobs \ /var/spool/cron/crontabs \ /var/svc \ /var/svc/log \ /var/svc/manifest \ /var/svc/manifest/milestone \ /var/svc/manifest/device \ /var/svc/manifest/system \ /var/svc/manifest/system/device \ /var/svc/manifest/system/filesystem \ /var/svc/manifest/system/security \ /var/svc/manifest/system/svc \ /var/svc/manifest/network \ /var/svc/manifest/network/dns \ /var/svc/manifest/network/ipsec \ /var/svc/manifest/network/ldap \ /var/svc/manifest/network/nfs \ /var/svc/manifest/network/nis \ /var/svc/manifest/network/rpc \ /var/svc/manifest/network/routing \ /var/svc/manifest/network/security \ /var/svc/manifest/network/shares \ /var/svc/manifest/application \ /var/svc/manifest/application/management \ /var/svc/manifest/application/print \ /var/svc/manifest/application/security \ /var/svc/manifest/platform \ /var/svc/manifest/platform/sun4u \ /var/svc/manifest/platform/sun4v \ /var/svc/manifest/site \ /var/svc/profile \ /var/tmp \ sparcv9_DIRS64= \ /platform/sun4u \ /platform/sun4u/lib \ /platform/sun4u/lib/$(MACH64) \ /usr/platform/sun4u \ /usr/platform/sun4u/sbin \ /usr/platform/sun4u/lib \ /platform/sun4v/lib \ /platform/sun4v/lib/$(MACH64) \ /usr/platform/sun4v/sbin \ /usr/platform/sun4v/lib \ /usr/platform/sun4u-us3/lib \ /usr/platform/sun4u-opl/lib amd64_DIRS64= DIRS64= \ $($(MACH64)_DIRS64) \ /lib/$(MACH64) \ /lib/crypto/$(MACH64) \ /lib/fm/$(MACH64) \ /lib/secure/$(MACH64) \ /usr/bin/$(MACH64) \ /usr/ccs/bin/$(MACH64) \ /usr/ccs/lib/$(MACH64) \ /usr/lib/$(MACH64) \ /usr/lib/$(MACH64)/gss \ /usr/lib/brand/sn1/$(MACH64) \ /usr/lib/brand/solaris10/$(MACH64) \ /usr/lib/elfedit/$(MACH64) \ /usr/lib/fm/$(MACH64) \ /usr/lib/fs/nfs/$(MACH64) \ /usr/lib/fs/smb/$(MACH64) \ /usr/lib/inet/$(MACH64) \ /usr/lib/krb5/$(MACH64) \ /usr/lib/link_audit/$(MACH64) \ /usr/lib/lwp/$(MACH64) \ /usr/lib/mdb/kvm/$(MACH64) \ /usr/lib/mdb/proc/$(MACH64) \ /usr/lib/rcap/$(MACH64) \ /usr/lib/sasl/$(MACH64) \ /usr/lib/scsi/$(MACH64) \ /usr/lib/secure/$(MACH64) \ /usr/lib/security/$(MACH64) \ /usr/lib/smbsrv/$(MACH64) \ /usr/lib/abi/$(MACH64) \ /usr/lib/varpd/$(MACH64) \ /usr/sbin/$(MACH64) \ /usr/xpg4/lib/$(MACH64) \ /var/ld/$(MACH64) # macros for symbolic links SYM.DIRS= \ /dev/stdin \ /dev/stdout \ /dev/stderr \ /etc/log \ /lib/32 \ /lib/crypto/32 \ /lib/secure/32 \ /usr/adm \ /usr/lib/tmac \ /usr/ccs/lib/link_audit \ /usr/preserve \ /usr/lib/32 \ /usr/lib/cron \ /usr/lib/locale/POSIX \ /usr/lib/elfedit/32 \ /usr/lib/lwp/32 \ /usr/lib/link_audit/32 \ /usr/lib/secure/32 \ /usr/man \ /usr/pub \ /usr/src \ /usr/tmp \ /var/ld/32 sparc_SYM.DIRS64= SYM.DIRS64= \ $($(MACH)_SYM.DIRS64) \ /lib/64 \ /lib/crypto/64 \ /lib/secure/64 \ /usr/lib/64 \ /usr/lib/brand/sn1/64 \ /usr/lib/brand/solaris10/64 \ /usr/lib/elfedit/64 \ /usr/lib/fm/64 \ /usr/lib/link_audit/64 \ /usr/lib/lwp/64 \ /usr/lib/secure/64 \ /usr/lib/security/64 \ /usr/lib/varpd/64 \ /usr/xpg4/lib/64 \ /var/ld/64 # prepend the ROOT prefix ROOTDIRS= $(TARGETDIRS:%=$(ROOT)%) # conditional assignments # # Target directories with non-default values for owner and group must # be referenced here, using their fully-prefixed names, and the non- # default values assigned. If a directory is mentioned above and not # mentioned below, it has default values for attributes. # # The default value for DIRMODE is specified in usr/src/Makefile.master. # # Hammerhead: Converted dmake target-specific := to GNU Make : syntax $(ROOT)/var/adm $(ROOT)/var/adm/sa: DIRMODE = 775 # file mode # $(ROOT)/tmp $(ROOT)/var/krb5/rcache $(ROOT)/var/preserve \ $(ROOT)/var/tmp: DIRMODE = 1777 $(ROOT)/root: DIRMODE = 700 $(ROOT)/var/krb5/rcache/root: DIRMODE = 700 # # These permissions must match the ones set # internally by fdfs and autofs. # $(ROOT)/dev/fd $(ROOT)/home: DIRMODE = 555 $(ROOT)/proc: DIRMODE = 555 $(ROOT)/system/boot: DIRMODE = 555 $(ROOT)/system/contract: DIRMODE = 555 $(ROOT)/system/object: DIRMODE = 555 # symlink assignments, LINKDEST is the value of the symlink # Hammerhead: Converted dmake := to GNU Make : syntax $(ROOT)/usr/lib/cron: LINKDEST = ../../etc/cron.d $(ROOT)/lib/32: LINKDEST = . $(ROOT)/lib/crypto/32: LINKDEST = . $(ROOT)/lib/secure/32: LINKDEST = . $(ROOT)/dev/stdin: LINKDEST = fd/0 $(ROOT)/dev/stdout: LINKDEST = fd/1 $(ROOT)/dev/stderr: LINKDEST = fd/2 $(ROOT)/usr/pub: LINKDEST = share/lib/pub $(ROOT)/usr/man: LINKDEST = share/man $(ROOT)/usr/src: LINKDEST = share/src $(ROOT)/usr/adm: LINKDEST = ../var/adm $(ROOT)/etc/log: LINKDEST = ../var/adm/log $(ROOT)/usr/preserve: LINKDEST = ../var/preserve $(ROOT)/usr/tmp: LINKDEST = ../var/tmp $(ROOT)/usr/lib/tmac: LINKDEST = ../share/lib/tmac $(ROOT)/usr/lib/32: LINKDEST = . $(ROOT)/usr/lib/elfedit/32: LINKDEST = . $(ROOT)/usr/lib/locale/POSIX: LINKDEST = ./C $(ROOT)/usr/lib/lwp/32: LINKDEST = . $(ROOT)/usr/lib/link_audit/32: LINKDEST = . $(ROOT)/usr/lib/secure/32: LINKDEST = . $(ROOT)/usr/ccs/lib/link_audit: LINKDEST = ../../lib/link_audit $(ROOT)/var/ld/32: LINKDEST = . # Hammerhead: 64 -> . (flat layout, no amd64 subdirectory) ifneq ($(BUILD64),$(POUND_SIGN)) $(ROOT)/lib/64: LINKDEST = . $(ROOT)/lib/crypto/64: LINKDEST = . $(ROOT)/lib/secure/64: LINKDEST = . $(ROOT)/usr/lib/64: LINKDEST = . $(ROOT)/usr/lib/elfedit/64: LINKDEST = . $(ROOT)/usr/lib/brand/sn1/64: LINKDEST = . $(ROOT)/usr/lib/brand/solaris10/64: LINKDEST = . $(ROOT)/usr/lib/fm/64: LINKDEST = . $(ROOT)/usr/lib/lwp/64: LINKDEST = . $(ROOT)/usr/lib/link_audit/64: LINKDEST = . $(ROOT)/usr/lib/secure/64: LINKDEST = . $(ROOT)/usr/lib/security/64: LINKDEST = . $(ROOT)/usr/lib/varpd/64: LINKDEST = . $(ROOT)/usr/xpg4/lib/64: LINKDEST = . $(ROOT)/var/ld/64: LINKDEST = . endif # # Installing a directory symlink calls for overriding INS.dir to install # a symlink. # $(DIRLINKS:%=$(ROOT)%): INS.dir = -$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@