Browse Source

- some more clean targets; add some more wrapper targets for image creation

master
vanhofen 7 years ago
parent
commit
44633b9e09
  1. 29
      make/clean.mk
  2. 8
      make/environment.mk
  3. 2
      make/images.mk
  4. 28
      make/ni.mk

29
make/clean.mk

@ -11,17 +11,26 @@ staging-clean:
static-clean: static-clean:
-rm -rf $(STATIC_DIR) -rm -rf $(STATIC_DIR)
static-base-clean:
-rm -rf $(STATIC_BASE)
cross-clean: cross-clean:
-rm -rf $(CROSS_DIR) -rm -rf $(CROSS_DIR)
cross-base-clean:
-rm -rf $(CROSS_BASE)
host-clean: host-clean:
-rm -rf $(HOST_DIR) -rm -rf $(HOST_DIR)
all-clean: rebuild-clean staging-clean static-clean ccache-clean:
@echo -e "\n$(TERM_RED_BOLD)Any other key then CTRL-C will now remove CROSS_DIR and HOST_DIR$(TERM_NORMAL)" @echo "Clearing $$CCACHE_DIR"
@$(CCACHE) -C
all-clean: rebuild-clean staging-clean host-clean static-base-clean
@echo -e "\n$(TERM_RED_BOLD)Any other key then CTRL-C will now remove CROSS_DIR$(TERM_NORMAL)"
@read @read
make cross-clean make cross-base-clean
make host-clean
%-clean: %-clean:
cd $(D) && find . -name $(subst -clean,,$@) -delete cd $(D) && find . -name $(subst -clean,,$@) -delete
@ -33,17 +42,17 @@ clean-all:
make staging-clean make staging-clean
make clean make clean
ccache-clean:
@echo "Clearing $$CCACHE_DIR"
@$(CCACHE) -C
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
PHONY += rebuild-clean PHONY += rebuild-clean
PHONY += staging-clean PHONY += staging-clean
PHONY += stytic-clean PHONY += static-clean
PHONY += static-base-clean
PHONY += cross-clean
PHONY += cross-base-clean
PHONY += host-clean
PHONY += ccache-clean
PHONY += all-clean PHONY += all-clean
PHONY += %-clean PHONY += %-clean
PHONY += clean PHONY += clean
PHONY += clean-all PHONY += clean-all
PHONY += ccache-clean

8
make/environment.mk

@ -139,13 +139,15 @@ HOST_DIR = $(BASE_DIR)/host
TARGET_DIR ?= $(BASE_DIR)/root TARGET_DIR ?= $(BASE_DIR)/root
SOURCE_DIR = $(BASE_DIR)/source SOURCE_DIR = $(BASE_DIR)/source
MAKE_DIR = $(BASE_DIR)/make MAKE_DIR = $(BASE_DIR)/make
STAGING_DIR = $(BASE_DIR)/staging
LOCAL_DIR = $(BASE_DIR)/local LOCAL_DIR = $(BASE_DIR)/local
STAGING_DIR = $(BASE_DIR)/staging
IMAGE_DIR = $(STAGING_DIR)/images IMAGE_DIR = $(STAGING_DIR)/images
UPDATE_DIR = $(STAGING_DIR)/updates UPDATE_DIR = $(STAGING_DIR)/updates
STATIC_DIR = $(BASE_DIR)/static/$(BOXARCH)/$(BOXSERIES) STATIC_BASE = $(BASE_DIR)/static
STATIC_DIR = $(STATIC_BASE)/$(BOXARCH)/$(BOXSERIES)
HELPERS_DIR = $(BASE_DIR)/helpers HELPERS_DIR = $(BASE_DIR)/helpers
CROSS_DIR ?= $(BASE_DIR)/cross/$(BOXARCH)/$(BOXSERIES) CROSS_BASE = $(BASE_DIR)/cross
CROSS_DIR ?= $(CROSS_BASE)/$(BOXARCH)/$(BOXSERIES)
CONFIGS = $(BASE_DIR)/archive-configs CONFIGS = $(BASE_DIR)/archive-configs
PATCHES = $(BASE_DIR)/archive-patches PATCHES = $(BASE_DIR)/archive-patches
IMAGEFILES = $(BASE_DIR)/archive-imagefiles IMAGEFILES = $(BASE_DIR)/archive-imagefiles

2
make/images.mk

@ -93,7 +93,7 @@ devtable-remove:
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
images: flash-image:
ifeq ($(BOXMODEL), nevis) ifeq ($(BOXMODEL), nevis)
make flash-image-cst ERASE_SIZE=0x20000 BOXNAME="HD1, BSE, Neo, Neo², Zee" make flash-image-cst ERASE_SIZE=0x20000 BOXNAME="HD1, BSE, Neo, Neo², Zee"
endif endif

28
make/ni.mk

@ -9,21 +9,25 @@ ifneq ($(DEBUG), yes)
BOXSERIES_UPDATE += hd1 BOXSERIES_UPDATE += hd1
endif endif
neutrino-update \
ni-neutrino-update: ni-neutrino-update:
make u-neutrino make u-neutrino
neutrino-updates \
ni-neutrino-updates: ni-neutrino-updates:
for boxseries in $(BOXSERIES_UPDATE); do \ for boxseries in $(BOXSERIES_UPDATE); do \
$(MAKE) BOXSERIES=$${boxseries} clean ni-neutrino-update || exit; \ $(MAKE) BOXSERIES=$${boxseries} clean neutrino-update || exit; \
done; done;
make clean make clean
neutrino-full-update \
ni-neutrino-full-update: ni-neutrino-full-update:
make u-neutrino-full make u-neutrino-full
neutrino-full-updates \
ni-neutrino-full-updates: ni-neutrino-full-updates:
for boxseries in $(BOXSERIES_UPDATE); do \ for boxseries in $(BOXSERIES_UPDATE); do \
$(MAKE) BOXSERIES=$${boxseries} clean ni-neutrino-full-update || exit; \ $(MAKE) BOXSERIES=$${boxseries} clean neutrino-full-update || exit; \
done; done;
make clean make clean
@ -33,15 +37,17 @@ BOXMODEL_IMAGE = apollo kronos kronos_v2 hd51
ifneq ($(DEBUG), yes) ifneq ($(DEBUG), yes)
BOXMODEL_IMAGE += nevis BOXMODEL_IMAGE += nevis
endif endif
images \
ni-images: ni-images:
for boxmodel in $(BOXMODEL_IMAGE); do \ for boxmodel in $(BOXMODEL_IMAGE); do \
$(MAKE) BOXMODEL=$${boxmodel} clean ni-image || exit; \ $(MAKE) BOXMODEL=$${boxmodel} clean image || exit; \
done; done;
make clean make clean
personalized-image: personalized-image:
make ni-image PERSONALIZE=yes make image PERSONALIZE=yes
image \
ni-image: ni-image:
@echo "starting 'make $@' build with "$(NUM_CPUS)" threads!" @echo "starting 'make $@' build with "$(NUM_CPUS)" threads!"
make -j$(NUM_CPUS) neutrino make -j$(NUM_CPUS) neutrino
@ -107,7 +113,7 @@ endif
make scripts make scripts
make init-scripts make init-scripts
make rootfs make rootfs
make images make flash-image
@make done @make done
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
@ -131,11 +137,11 @@ changelogs:
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
PHONY += init PHONY += init
PHONY += ni-neutrino-update PHONY += neutrino-update ni-neutrino-update
PHONY += ni-neutrino-updates PHONY += neutrino-updates ni-neutrino-updates
PHONY += ni-neutrino-full-update PHONY += neutrino-full-update ni-neutrino-full-update
PHONY += ni-neutrino-full-updates PHONY += neutrino-full-updates ni-neutrino-full-updates
PHONY += ni-images PHONY += images ni-images
PHONY += personalized-image PHONY += personalized-image
PHONY += ni-image PHONY += image ni-image
PHONY += changelogs PHONY += changelogs

Loading…
Cancel
Save