summaryrefslogtreecommitdiff
path: root/Makefile.test
blob: 392ea37222172183b9bd341e9bcbf5f996680a39 (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
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
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/make -f
export OPIEDIR:=$(shell pwd)
export TOPDIR:=$(OPIEDIR)

export QMAKESPECSDIR=$(OPIEDIR)/mkspecs
export QMAKESPEC=$(QMAKESPECSDIR)/qws/linux-generic-g++

# $(TOPDIR)/.config depends on .depends.cfgs, as it depends on $(configs)
# in order to have a full set of config.in files.
# .depends depends on $(TOPDIR)/.config
# everything else depends on .depends, to ensure the dependencies are
# intact.
#
# NOTE: The order in which things happen in this makefile is
# 	-critical-. Do not rearrange this!
 
all : $(TOPDIR)/.config

$(TOPDIR)/.config : $(TOPDIR)/.depends.cfgs

all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(TOPDIR)/.depends

clean-configs : $(TOPDIR)/.depends.cfgs
	@echo "Wiping generated config.in files..."
	@-rm -f $(configs)

-include $(TOPDIR)/.depends.cfgs

all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(configs)

$(TOPDIR)/.config: $(TOPDIR)/.depends.cfgs $(configs)
	$(call descend,scripts/kconfig,conf)
	@if [ ! -e $@ ]; then \
		cp $(TOPDIR)/def-configs/opie $@; \
	fi;
	@$(MAKE) -C scripts/kconfig conf;
	./scripts/kconfig/conf -s ./config.in

# config rules must have the $(configs) var defined
# at the time that they run. we must ensure that .depends.cfgs
# is built and included by the time we reach this point.
	
xconfig :
	$(call descend,scripts/kconfig,qconf)
	./scripts/kconfig/qconf ./config.in

menuconfig : scripts/lxdialog/lxdialog
	$(call descend,scripts/kconfig,mconf)
	./scripts/kconfig/mconf ./config.in

config :
	$(call descend,scripts/kconfig,conf)
	./scripts/kconfig/conf ./config.in
 
oldconfig :
	$(call descend,scripts/kconfig,conf)
	./scripts/kconfig/conf -o ./config.in
 
randconfig :
	$(call descend,scripts/kconfig,conf)
	./scripts/kconfig/conf -r ./config.in
 
allyesconfig :
	$(call descend,scripts/kconfig,conf)
	./scripts/kconfig/conf -y ./config.in
 
allnoconfig :
	$(call descend,scripts/kconfig,conf)
	./scripts/kconfig/conf -n ./config.in
 
defconfig :
	$(call descend,scripts/kconfig,conf)
	./scripts/kconfig/conf -d ./config.in


ifeq ($(if $(filter clean%,$(MAKECMDGOALS)),clean,notclean),notclean)
-include $(TOPDIR)/.config
endif
ifeq ($(shell if [ -e $(TOPDIR)/..config.cmd ]; then echo exists; fi),exists)
-include $(TOPDIR)/..config.cmd
endif
ifeq ($(if $(filter clean%,$(MAKECMDGOALS)),clean,notclean),notclean)
-include $(TOPDIR)/.depends
endif

all : $(subdir-y)
	
include $(TOPDIR)/Rules.make