-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (45 loc) · 1.98 KB
/
Makefile
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
# Hey Emacs, this is a -*- makefile -*-
APP := aostubs
CONFIGDIR = config
ARCH = _msp430
KCONFDIR := kconf
QCONFFRONTEND ?= $(KCONFDIR)/kconfig/qconf
MCONFFRONTEND ?= $(KCONFDIR)/kconfig/mconf
TRANSFORM=$(KCONFDIR)/common/scripts/transform.pl
# Advice user to change its working directory to compile aostubs without kconfig
all:
@echo "Error: You cannot compile in this directory."
@echo " Please change your working directory to ./src/"
wsim: all
wsim-net: all
flash: all
clean: all
.PHONY: xconfig menuconfig transform
# This phony target allows the user to change the configuration without
# the need for any of the dependencies to have changed
xconfig: $(APP).temp.fm
# @if ! test -e $(QCONFFRONTEND); then make -C kconf/kconfig xconfig; fi
$(QCONFFRONTEND) $(APP).temp.fm $(APP).config
#gconfig: $(APP).temp.fm
# @if ! test -e $(GCONFFRONTEND); then make -C kconf/kconfig gconfig; fi
# $(GCONFFRONTEND) $(APP).temp.fm $(APP).config
menuconfig: $(APP).temp.fm
# @if ! test -e $(MCONFFRONTEND); then make -C kconf/kconfig menuconfig; fi
$(MCONFFRONTEND) $(APP).temp.fm $(APP).config
#config: $(APP).temp.fm
# @if ! test -e $(ICONFFRONTEND); then make -C kconf/kconfig config; fi
# @if test -e $(APP).config; then mv $(APP).config .config; fi
# $(ICONFFRONTEND) $(APP).temp.fm
# @if test -e .config; then mv .config $(APP).config; fi
# generates a variant of OS and application from the configuration
FMDIR := $(KCONFDIR)/common/family/
FAMILYMODELS ?= $(FMDIR)aostubs.cmp.pl:$(FMDIR)user.cmp.pl
transform: $(APP).config
$(TRANSFORM) -f $(APP).config -i src/ -o $(CONFIGDIR) -a $(ARCH) -m "$(FAMILYMODELS)" $(TRANSFORMFLAGS)
@awk -f $(KCONFDIR)/common/scripts/conf2h.awk $(APP).config > $(CONFIGDIR)/kconfig.h
@chmod +x config/scripts/rfuploader/uploader.sh config/scripts/rfuploader/rfuploader.tcl
$(APP).temp.fm:
@echo source $(KCONFDIR)/common/features/aostubs.fm >$@
@echo source $(KCONFDIR)/common/features/user.fm >>$@
.PHONY: $(APP).temp.fm
.INTERMEDIATE: $(APP).temp.fm