BuildCommon.mk 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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_APT_CACHE := $(PRAWNOS_BUILD)/apt-cache
  18. ### PRAWNOS IMAGES
  19. ifeq ($(DEBIAN_SUITE),)
  20. DEBIAN_SUITE := buster
  21. endif
  22. ifeq ($(PRAWNOS_SUITE),)
  23. PRAWNOS_SUITE := Shiba
  24. endif
  25. PRAWNOS_IMAGE := PrawnOS-$(PRAWNOS_SUITE)-c201.img
  26. PRAWNOS_IMAGE_BASE := $(OUTNAME)-BASE
  27. ### BUILD SCRIPTS
  28. PRAWNOS_BUILD_SCRIPTS := $(PRAWNOS_SCRIPTS)/BuildScripts
  29. PRAWNOS_FILESYSTEM_SCRIPTS := $(PRAWNOS_BUILD_SCRIPTS)/FilesystemScripts
  30. PRAWNOS_FILESYSTEM_SCRIPTS_BUILD := $(PRAWNOS_FILESYSTEM_SCRIPTS)/buildFilesystem.sh
  31. PRAWNOS_KERNEL_SCRIPTS := $(PRAWNOS_BUILD_SCRIPTS)/KernelScripts
  32. PRAWNOS_KERNEL_SCRIPTS_BUILD := $(PRAWNOS_KERNEL_SCRIPTS)/buildKernel.sh
  33. PRAWNOS_KERNEL_SCRIPTS_MENUCONFIG := $(PRAWNOS_KERNEL_SCRIPTS)/crossMenuConfig.sh
  34. PRAWNOS_KERNEL_SCRIPTS_PATCH := $(PRAWNOS_KERNEL_SCRIPTS)/patchKernel.sh
  35. PRAWNOS_KERNEL_SCRIPTS_BUILD_ATH9K := $(PRAWNOS_KERNEL_SCRIPTS)/buildAth9k.sh
  36. PRAWNOS_IMAGE_SCRIPTS := $(PRAWNOS_BUILD_SCRIPTS)/ImageScripts
  37. PRAWNOS_IMAGE_SCRIPTS_INSTALL_KERNEL := $(PRAWNOS_IMAGE_SCRIPTS)/installKernelToFs.sh
  38. PRAWNOS_INITRAMFS_SCRIPTS := $(PRAWNOS_BUILD_SCRIPTS)/InitramfsScripts
  39. PRAWNOS_INITRAMFS_SCRIPTS_BUILD := $(PRAWNOS_INITRAMFS_SCRIPTS)/buildInitramFs.sh
  40. PRAWNOS_PACKAGE_SCRIPTS := $(PRAWNOS_BUILD_SCRIPTS)/PackageScripts
  41. PRAWNOS_PACKAGE_SCRIPTS_INSTALL := $(PRAWNOS_PACKAGE_SCRIPTS)/installPackage.sh
  42. PRAWNOS_PACKAGE_SCRIPTS_PBUILD := $(PRAWNOS_PACKAGE_SCRIPTS)/pbuildPackage.sh
  43. PRAWNOS_PACKAGE_SCRIPTS_UPLOAD := $(PRAWNOS_PACKAGE_SCRIPTS)/uploadPackage.sh
  44. ### INSTALL SCRIPTS
  45. PRAWNOS_INSTALL_SCRIPTS := $(PRAWNOS_SCRIPTS)/InstallScripts
  46. ### SHARED SCRIPTS
  47. PRAWNOS_SHARED_SCRIPTS := $(PRAWNOS_SCRIPTS)/Shared
  48. PRAWNOS_SHARED_SCRIPTS_PACKAGE_LISTS := $(PRAWNOS_SHARED_SCRIPTS)/package_lists.sh
  49. ### PBUILDER RESOURCES
  50. PBUILDER_DIR := $(PRAWNOS_ROOT)/resources/BuildResources/pbuilder
  51. PBUILDER_CHROOT := $(PRAWNOS_BUILD)/prawnos-pbuilder-armhf-base.tgz
  52. PBUILDER_RC := $(PBUILDER_DIR)/prawnos-pbuilder.rc
  53. PBUILDER_HOOKS := $(PBUILDER_DIR)/hooks
  54. PBUILDER_VARS := $(PBUILDER_CHROOT) $(PBUILDER_RC) $(PBUILDER_HOOKS)
  55. ### LOCAL APT RESOURCES
  56. PRAWNOS_LOCAL_APT_REPO := $(PRAWNOS_BUILD)/prawnos-local-apt-repo
  57. PRAWNOS_LOCAL_APT_SOURCE := "deb [trusted=yes] file://$(PRAWNOS_LOCAL_APT_REPO) ./"
  58. PRAWNOS_LOCAL_APT_VARS := $(PRAWNOS_LOCAL_APT_REPO) $(PRAWNOS_LOCAL_APT_SOURCE)
  59. ### KERNEL
  60. PRAWNOS_KERNEL_BUILD := $(PRAWNOS_BUILD)/linux-$(KVER)
  61. ### INITRAMFS
  62. PRAWNOS_INITRAMFS_IMAGE := $(PRAWNOS_BUILD)/PrawnOS-initramfs.cpio.gz
  63. ### ATH9K
  64. PRAWNOS_ATH9K_BUILD := $(PRAWNOS_BUILD)/open-ath9k-htc-firmware
  65. #=========================================================================================
  66. #Place all shared make rules below
  67. #=========================================================================================
  68. $(PRAWNOS_BUILD): $(PRAWNOS_BUILD_LOGS) $(PRAWNOS_BUILD_APT_CACHE)
  69. $(PRAWNOS_BUILD_LOGS):
  70. mkdir -p $(PRAWNOS_BUILD_LOGS)
  71. $(PRAWNOS_BUILD_APT_CACHE):
  72. mkdir -p $(PRAWNOS_BUILD_APT_CACHE)
  73. #=========================================================================================
  74. endif # BUILD_COMMON_MK