-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollout.elf.mk
78 lines (66 loc) · 2.81 KB
/
rollout.elf.mk
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
################################################################################
# rollout include make path
################################################################################
# ------------------------------------------------------------------------------
# bouild up summary of the files to be exported
# ------------------------------------------------------------------------------
ROLLOUT_FILES =
ROLLOUT_SVN_PATH =
ifneq ($(BIN),)
ROLLOUT_FILES += $(ROLLOUT_PATH)/$(BIN)
ROLLOUT_SVN_PATH += $(ROLLOUT_PATH)/$(BIN_BASE)
endif
ifneq ($(ARC),)
ROLLOUT_FILES += $(ROLLOUT_PATH)/$(ARC)
ROLLOUT_SVN_PATH += $(ROLLOUT_PATH)/$(ARC_BASE)
endif
ifneq ($(LIB),)
ROLLOUT_FILES += $(ROLLOUT_PATH)/$(LIB)
ROLLOUT_SVN_PATH += $(ROLLOUT_PATH)/$(LIB_BASE)
endif
ifneq ($(ROLLOUT_INC),)
ROLLOUT_SVN_PATH += $(ROLLOUT_PATH)/$(INCLUDE_PATH)
ROLLOUT_FILES += $(addprefix $(ROLLOUT_PATH)/$(INCLUDE_PATH)/,$(ROLLOUT_INC))
endif
# ------------------------------------------------------------------------------
# go through all compiler 64 AND 32 bits
# ------------------------------------------------------------------------------
rollout: svn_commit.rollout
#$(SVN) ci . $(MAKE_INCLUDE_PATH) -F $<
$(MAKE) --no-print-directory CC=gcc BIT=64 rollout_cc
$(MAKE) --no-print-directory CC=gcc BIT=32 rollout_cc
ifeq ($(OS_ARCH),SunOS)
$(MAKE) --no-print-directory CC=cc BIT=64 rollout_cc
$(MAKE) --no-print-directory CC=cc BIT=32 rollout_cc
endif
$(SVN) ci $(sort $(ROLLOUT_SVN_PATH)) -F $<
$(MV) $< $(subst .rollout,.done,$<)
# ------------------------------------------------------------------------------
# rollout single compiler with 32 OR 64 bits
# SVN ls causes exit make if file not in repository yet
# ------------------------------------------------------------------------------
rollout_cc: all $(ROLLOUT_FILES)
@ $(SVN) ls $(filter-out $<,$^) 1>/dev/null
# ------------------------------------------------------------------------------
# rollout copy rules
# ------------------------------------------------------------------------------
$(ROLLOUT_PATH)/$(BIN_PATH)/% : $(BIN_PATH)/%
$(CP) $^ $(dir $@)
$(ROLLOUT_PATH)/$(ARC_PATH)/%.a : $(ARC_PATH)/%.a
$(CP) $^ $(dir $@)
$(ROLLOUT_PATH)/$(LIB_PATH)/%.so : $(LIB_PATH)/%.so
$(CP) $^ $(dir $@)
$(ROLLOUT_PATH)/$(INCLUDE_PATH)/%.h : $(INCLUDE_PATH)/%.h
$(CP) $^ $(dir $@)
# ------------------------------------------------------------------------------
# cross plaform
# ------------------------------------------------------------------------------
platform: svn_commit.msg
$(MAKE) --no-print-directory CC=gcc BIT=64 test
$(MAKE) --no-print-directory CC=gcc BIT=32 test
ifeq ($(OS_ARCH),SunOS)
$(MAKE) --no-print-directory CC=cc BIT=64 test
$(MAKE) --no-print-directory CC=cc BIT=32 test
endif
$(SVN) ci . $(MAKE_INCLUDE_PATH) -F $<
$(MV) $< $(subst .msg,.rollout,$<)