]> git.cameronkatri.com Git - dotfiles.git/blobdiff - .crossenv.zsh
neomuttrc: sort by threads
[dotfiles.git] / .crossenv.zsh
index fe0b11b4b537e77d0ed09f5d630c2697d28ccebd..10c1a5e0b708da5e5d823f694e2fbe8e282e41c1 100644 (file)
@@ -14,7 +14,7 @@ iphoneos-arm64-proenv() {
        export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
 }
 
-iphoneos-arm64-env() {
+apple_cmds-env() {
        TARGET_SYSROOT='/usr/home/cameron/Documents/iOS/SDK/iPhoneOS12.0.sdk'
        CC='aarch64-apple-darwin-clang' CXX='aarch64-apple-darwin-clang++' AR='aarch64-apple-darwin-ar' LD='aarch64-apple-darwin-ld' CPP='aarch64-apple-darwin-clang -E' RANLIB='aarch64-apple-darwin-ranlib' STRIP='aarch64-apple-darwin-strip' NM='aarch64-apple-darwin-nm' LIPO='aarch64-apple-darwin-lipo' OTOOL='aarch64-apple-darwin-otool' I_N_T='aarch64-apple-darwin-install_name_tool' LDID='ldid'
        CFLAGS='-Os -g -arch arm64 -isysroot /usr/home/cameron/Documents/iOS/SDK/iPhoneOS12.0.sdk -miphoneos-version-min=12.0 -isystem /usr/home/cameron/Documents/iOS/apple_cmds/base/include'
@@ -25,13 +25,53 @@ iphoneos-arm64-env() {
        export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
 }
 
+darwin-env() {
+       CC='aarch64-apple-darwin-clang' CXX='aarch64-apple-darwin-clang++' AR='aarch64-apple-darwin-ar' LD='aarch64-apple-darwin-ld' CPP='aarch64-apple-darwin-clang -E' RANLIB='aarch64-apple-darwin-ranlib' STRIP='aarch64-apple-darwin-strip' NM='aarch64-apple-darwin-nm' LIPO='aarch64-apple-darwin-lipo' OTOOL='aarch64-apple-darwin-otool' I_N_T='aarch64-apple-darwin-install_name_tool' LDID='ldid'
+       OPTIMIZATION_FLAGS="-Os -g -flto=thin"
+       DEFAULT_CFLAGS="${OPTIMIZATION_FLAGS} -isystem ${HOME}/Documents/iOS/include"
+       DEFAULT_CPPFLAGS="${OPTIMIZATION_FLAGS} -isystem ${HOME}/Documents/iOS/include"
+       DEFAULT_CXXLAGS="${OPTIMIZATION_FLAGS} -isystem ${HOME}/Documents/iOS/include"
+       DEFAULT_LDFLAGS="${OPTIMIZATION_FLAGS}"
+       IPHONEOS_CFLAGS="-arch arm64 -isysroot ${IPHONEOS_SYSROOT} -miphoneos-version-min=14.0"
+       WATCHOS_CFLAGS="-arch arm64_32 -isysroot ${WATCHOS_SYSROOT} -mwatchos-version-min=7.0"
+       TVOS_CFLAGS="-arch arm64 -isysroot ${TVOS_SYSROOT} -mappletvos-version-min=14.0"
+       export CC CXX AR LD CPP RANLIB STRIP NM LIPO OTOOL I_N_T LDID
+       export OPTIMIZATION_FLAGS DEFAULT_CFLAGS DEFAULT_CXXFLAGS DEFAULT_CPPFLAGS DEFAULT_LDFLAGS IPHONEOS_CFLAGS WATCHOS_CFLAGS TVOS_CFLAGS
+}
+
+iphoneos-arm64-env() {
+       darwin-env
+       export CFLAGS="${DEFAULT_CFLAGS} ${IPHONEOS_CFLAGS}"
+       export CPPFLAGS="${DEFAULT_CPPFLAGS} ${IPHONEOS_CFLAGS}"
+       export CXXFLAGS="${DEFAULT_CXXFLAGS} ${IPHONEOS_CFLAGS}"
+       export LDFLAGS="${DEFAULT_LDFLAGS} ${IPHONEOS_CFLAGS}"
+}
+
+appletvos-arm64-env() {
+       darwin-env
+       export CFLAGS="${DEFAULT_CFLAGS} ${TVOS_CFLAGS}"
+       export CPPFLAGS="${DEFAULT_CPPFLAGS} ${WATCHOS_CFLAGS}"
+       export CXXFLAGS="${DEFAULT_CXXFLAGS} ${WATCHOS_CFLAGS}"
+       export LDFLAGS="${DEFAULT_LDFLAGS} ${WATCHOS_CFLAGS}"
+}
+
+watchos-arm64_32-env() {
+       darwin-env
+       export CFLAGS="${DEFAULT_CFLAGS} ${WATCHOS_CFLAGS}"
+       export CPPFLAGS="${DEFAULT_CPPFLAGS} ${WATCHOS_CFLAGS}"
+       export CXXFLAGS="${DEFAULT_CXXFLAGS} ${WATCHOS_CFLAGS}"
+       export LDFLAGS="${DEFAULT_LDFLAGS} ${WATCHOS_CFLAGS}"
+}
+
 # Procursus Env Vars
-export TARGET_SYSROOT=/usr/home/cameron/Documents/iOS/SDK/iPhoneOS14.3.sdk
-export MACOSX_SYSROOT=/usr/home/cameron/Documents/iOS/SDK/MacOSX11.1.sdk
+export MACOSX_SYSROOT=/usr/home/cameron/Documents/iOS/SDK/MacOSX12.sdk
+export IPHONEOS_SYSROOT=/usr/home/cameron/Documents/iOS/SDK/iPhoneOS14.3.sdk
+export WATCHOS_SYSROOT=/usr/home/cameron/Documents/iOS/SDK/WatchOS7.2.sdk
+export TVOS_SYSROOT=/usr/home/cameron/Documents/iOS/SDK/AppleTVOS14.3.sdk
+export TARGET_SYSROOT=${IPHONEOS_SYSROOT}
 export DEB_MAINTAINER="Cameron Katri <me@cameronkatri.com>"
 export MEMO_DEVICE_IP=localhost
 export MEMO_DEVICE_PORT=2222
-export MEMO_FORCE_LTO=1
 export MEMO_TARGET=iphoneos-arm64
 export DPKG_TYPE=xz
 export GNUBINDIR=/usr/local/gnubin