summaryrefslogtreecommitdiff
path: root/polux/package/boottable/boottable.mk
blob: 3798c1492d7684798865a0466ce096b6de7d1c1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
############################################################
#
# boottable
#
############################################################
BOOTTABLE_BUILD_DIR:=$(APP_DIR)/boottable

BOOTTABLE_FILES=libbt.a bt
BOOTTABLE_TARGET=$(TARGET_DIR)/bin/bt
BOOTTABLE_BUILD=$(foreach target,$(BOOTTABLE_FILES),$(BOOTTABLE_BUILD_DIR)/$(target))

# For what archi we need to build.
ifeq ($(BR2_CONFIG_MARCH_MSE500_200),y)
	APPLI_ARCH=mse500
else ifeq ($(BR2_CONFIG_MARCH_SPC200C),y)
	APPLI_ARCH=spc200
else ifeq ($(BR2_CONFIG_MARCH_SPC200E),y)
	APPLI_ARCH=spc200
else
	$(error Unsupported architecture)
endif

$(BOOTTABLE_BUILD).$(APPLI_ARCH):
	$(MAKE) -C $(BOOTTABLE_BUILD_DIR) $(APPLI_ARCH)

$(BOOTTABLE_TARGET): $(BOOTTABLE_BUILD).$(APPLI_ARCH)
	@mkdir -p $(TARGET_DIR)/bin
	@cp $(BOOTTABLE_BUILD_DIR)/bt.$(APPLI_ARCH) $@

boottable: openssl mib $(BOOTTABLE_TARGET)

boottable-clean:
	$(MAKE) -C $(BOOTTABLE_BUILD_DIR) clean

boottable-mrproper: boottable-clean

.PHONY: boottable

###########################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_CONFIG_MASTER)),y)
TARGETS+=boottable
endif