BuildCommon.mk 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ifndef BUILD_COMMON_MK
  2. BUILD_COMMON_MK := 1
  3. #Place all shared make vars below
  4. #=========================================================================================
  5. ### MISC GLOBALS
  6. KVER=5.4.29
  7. # Otherwise errors are ignored when output is piped to tee:
  8. SHELL := /bin/bash -o pipefail
  9. ### PRAWNOS CORE DIRECTORIES
  10. PRAWNOS_BUILD := $(PRAWNOS_ROOT)/build
  11. PRAWNOS_SCRIPTS := $(PRAWNOS_ROOT)/scripts
  12. PRAWNOS_KERNEL := $(PRAWNOS_ROOT)/kernel
  13. PRAWNOS_INITRAMFS := $(PRAWNOS_ROOT)/initramfs
  14. PRAWNOS_FILESYSTEM := $(PRAWNOS_ROOT)/filesystem
  15. ### BUILD DIRS
  16. PRAWNOS_BUILD_LOGS := $(PRAWNOS_BUILD)/logs
  17. PRAWNOS_BUILD_DEBOOTSTRAP_APT_CACHE := $(PRAWNOS_BUILD)/debootstrap-apt-cache
  18. PRAWNOS_BUILD_CHROOT_APT_CACHE := $(PRAWNOS_BUILD)/chroot-apt-cache
  19. ### PRAWNOS IMAGES
  20. ifeq ($(DEBIAN_SUITE),)
  21. DEBIAN_SUITE := buster
  22. endif
  23. ifeq ($(PRAWNOS_SUITE),)
  24. PRAWNOS_SUITE := Shiba
  25. endif
  26. PRAWNOS_IMAGE := $(PRAWNOS_ROOT)/PrawnOS-$(PRAWNOS_SUITE)-c201.img
  27. PRAWNOS_IMAGE_BASE := $(PRAWNOS_IMAGE)-BASE
  28. ### BUILD SCRIPTS
  29. PRAWNOS_BUILD_SCRIPTS := $(PRAWNOS_SCRIPTS)/BuildScripts
  30. PRAWNOS_FILESYSTEM_SCRIPTS := $(PRAWNOS_BUILD_SCRIPTS)/FilesystemScripts
  31. PRAWNOS_FILESYSTEM_SCRIPTS_BUILD := $(PRAWNOS_FILESYSTEM_SCRIPTS)/buildFilesystem.sh
  32. PRAWNOS_KERNEL_SCRIPTS := $(PRAWNOS_BUILD_SCRIPTS)/KernelScripts
  33. PRAWNOS_KERNEL_SCRIPTS_BUILD := $(PRAWNOS_KERNEL_SCRIPTS)/buildKernel.sh
  34. PRAWNOS_KERNEL_SCRIPTS_MENUCONFIG := $(PRAWNOS_KERNEL_SCRIPTS)/crossMenuConfig.sh
  35. PRAWNOS_KERNEL_SCRIPTS_PATCH := $(PRAWNOS_KERNEL_SCRIPTS)/patchKernel.sh
  36. PRAWNOS_KERNEL_SCRIPTS_BUILD_ATH9K := $(PRAWNOS_KERNEL_SCRIPTS)/buildAth9k.sh
  37. PRAWNOS_IMAGE_SCRIPTS := $(PRAWNOS_BUILD_SCRIPTS)/ImageScripts
  38. PRAWNOS_IMAGE_SCRIPTS_INSTALL_KERNEL := $(PRAWNOS_IMAGE_SCRIPTS)/installKernelToFs.sh
  39. PRAWNOS_INITRAMFS_SCRIPTS := $(PRAWNOS_BUILD_SCRIPTS)/InitramfsScripts
  40. PRAWNOS_INITRAMFS_SCRIPTS_BUILD := $(PRAWNOS_INITRAMFS_SCRIPTS)/buildInitramFs.sh
  41. PRAWNOS_PACKAGE_SCRIPTS := $(PRAWNOS_BUILD_SCRIPTS)/PackageScripts
  42. PRAWNOS_PACKAGE_SCRIPTS_INSTALL := $(PRAWNOS_PACKAGE_SCRIPTS)/installPackage.sh
  43. PRAWNOS_PACKAGE_SCRIPTS_PBUILD := $(PRAWNOS_PACKAGE_SCRIPTS)/pbuildPackage.sh
  44. PRAWNOS_PACKAGE_SCRIPTS_UPLOAD := $(PRAWNOS_PACKAGE_SCRIPTS)/uploadPackage.sh
  45. ### INSTALL SCRIPTS
  46. PRAWNOS_INSTALL_SCRIPTS := $(PRAWNOS_SCRIPTS)/InstallScripts
  47. ### SHARED SCRIPTS
  48. PRAWNOS_SHARED_SCRIPTS := $(PRAWNOS_SCRIPTS)/Shared
  49. PRAWNOS_SHARED_SCRIPTS_PACKAGE_LISTS := $(PRAWNOS_SHARED_SCRIPTS)/package_lists.sh
  50. ### FILESYSTEM RESOURCES
  51. PRAWNOS_FILESYSTEM_RESOURCES := $(PRAWNOS_FILESYSTEM)/resources
  52. PRAWNOS_FILESYSTEM_PACKAGES := $(PRAWNOS_FILESYSTEM)/packages
  53. ### PBUILDER RESOURCES
  54. PBUILDER_DIR := $(PRAWNOS_FILESYSTEM_RESOURCES)//pbuilder
  55. PBUILDER_CHROOT := $(PRAWNOS_BUILD)/prawnos-pbuilder-armhf-base.tgz
  56. PBUILDER_RC := $(PBUILDER_DIR)/prawnos-pbuilder.rc
  57. PBUILDER_HOOKS := $(PBUILDER_DIR)/hooks
  58. PBUILDER_VARS := $(PBUILDER_CHROOT) $(PBUILDER_RC) $(PBUILDER_HOOKS)
  59. ### LOCAL APT RESOURCES
  60. PRAWNOS_LOCAL_APT_REPO := $(PRAWNOS_BUILD)/prawnos-local-apt-repo
  61. PRAWNOS_LOCAL_APT_SOURCE := "deb [trusted=yes] file://$(PRAWNOS_LOCAL_APT_REPO) ./"
  62. PRAWNOS_LOCAL_APT_VARS := $(PRAWNOS_LOCAL_APT_REPO) $(PRAWNOS_LOCAL_APT_SOURCE)
  63. ### KERNEL
  64. PRAWNOS_KERNEL_BUILD := $(PRAWNOS_BUILD)/linux-$(KVER)
  65. ### INITRAMFS
  66. PRAWNOS_INITRAMFS_IMAGE := $(PRAWNOS_BUILD)/PrawnOS-initramfs.cpio.gz
  67. ### ATH9K
  68. PRAWNOS_ATH9K_BUILD := $(PRAWNOS_BUILD)/open-ath9k-htc-firmware
  69. #=========================================================================================
  70. #Place all shared make rules below
  71. #=========================================================================================
  72. $(PRAWNOS_BUILD): $(PRAWNOS_BUILD_LOGS) $(PRAWNOS_BUILD_DEBOOTSTRAP_APT_CACHE) $(PRAWNOS_BUILD_CHROOT_APT_CACHE)
  73. $(PRAWNOS_BUILD_LOGS):
  74. mkdir -p $(PRAWNOS_BUILD_LOGS)
  75. $(PRAWNOS_BUILD_DEBOOTSTRAP_APT_CACHE):
  76. mkdir -p $(PRAWNOS_BUILD_DEBOOTSTRAP_APT_CACHE)
  77. $(PRAWNOS_BUILD_CHROOT_APT_CACHE):
  78. mkdir -p $(PRAWNOS_BUILD_CHROOT_APT_CACHE)
  79. #=========================================================================================
  80. endif # BUILD_COMMON_MK