summaryrefslogtreecommitdiff
path: root/Makefile
Unidiff
Diffstat (limited to 'Makefile') (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 4d11615..f5c0dbd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,125 +1,128 @@
1#!/usr/bin/make -f 1#!/usr/bin/make -f
2 2
3export TOPDIR:=$(shell pwd) 3export TOPDIR:=$(shell pwd)
4 4
5include $(TOPDIR)/Vars.make 5include $(TOPDIR)/Vars.make
6ifneq ($(wildcard $(TOPDIR)/Vars.local),)
7include $(TOPDIR)/Vars.local
8endif
6 9
7noconfig_targets := xconfig menuconfig config oldconfig randconfig \ 10noconfig_targets := xconfig menuconfig config oldconfig randconfig \
8 defconfig allyesconfig allnoconfig allmodconfig \ 11 defconfig allyesconfig allnoconfig allmodconfig \
9 clean-configs $(TOPDIR)/scripts/subst $(TOPDIR)/scripts/filesubst \ 12 clean-configs $(TOPDIR)/scripts/subst $(TOPDIR)/scripts/filesubst \
10 ipks 13 ipks
11 14
12configs += $(TOPDIR)/core/applets/config.in $(TOPDIR)/core/apps/config.in $(TOPDIR)/core/multimedia/config.in $(TOPDIR)/core/pim/config.in $(TOPDIR)/core/pim/today/plugins/config.in $(TOPDIR)/core/settings/config.in $(TOPDIR)/development/config.in $(TOPDIR)/inputmethods/config.in $(TOPDIR)/libopie/ofileselector/config.in $(TOPDIR)/libopie/pim/config.in $(TOPDIR)/libsql/config.in $(TOPDIR)/noncore/applets/config.in $(TOPDIR)/noncore/apps/opie-console/test/config.in $(TOPDIR)/noncore/apps/config.in $(TOPDIR)/noncore/comm/config.in $(TOPDIR)/noncore/decorations/config.in $(TOPDIR)/noncore/games/config.in $(TOPDIR)/noncore/graphics/config.in $(TOPDIR)/noncore/multimedia/config.in $(TOPDIR)/noncore/net/config.in $(TOPDIR)/noncore/net/opietooth/config.in $(TOPDIR)/noncore/settings/config.in $(TOPDIR)/noncore/styles/config.in $(TOPDIR)/noncore/tools/calc2/config.in $(TOPDIR)/noncore/tools/config.in $(TOPDIR)/noncore/todayplugins/config.in 15configs += $(TOPDIR)/core/applets/config.in $(TOPDIR)/core/apps/config.in $(TOPDIR)/core/multimedia/config.in $(TOPDIR)/core/pim/config.in $(TOPDIR)/core/pim/today/plugins/config.in $(TOPDIR)/core/settings/config.in $(TOPDIR)/development/config.in $(TOPDIR)/inputmethods/config.in $(TOPDIR)/libopie/ofileselector/config.in $(TOPDIR)/libopie/pim/config.in $(TOPDIR)/libsql/config.in $(TOPDIR)/noncore/applets/config.in $(TOPDIR)/noncore/apps/opie-console/test/config.in $(TOPDIR)/noncore/apps/config.in $(TOPDIR)/noncore/comm/config.in $(TOPDIR)/noncore/decorations/config.in $(TOPDIR)/noncore/games/config.in $(TOPDIR)/noncore/graphics/config.in $(TOPDIR)/noncore/multimedia/config.in $(TOPDIR)/noncore/net/config.in $(TOPDIR)/noncore/net/opietooth/config.in $(TOPDIR)/noncore/settings/config.in $(TOPDIR)/noncore/styles/config.in $(TOPDIR)/noncore/tools/calc2/config.in $(TOPDIR)/noncore/tools/config.in $(TOPDIR)/noncore/todayplugins/config.in
13 16
14# $(TOPDIR)/.config depends on .depends.cfgs, as it depends on $(configs) 17# $(TOPDIR)/.config depends on .depends.cfgs, as it depends on $(configs)
15# in order to have a full set of config.in files. 18# in order to have a full set of config.in files.
16# .depends depends on $(TOPDIR)/.config 19# .depends depends on $(TOPDIR)/.config
17# everything else depends on .depends, to ensure the dependencies are 20# everything else depends on .depends, to ensure the dependencies are
18# intact. 21# intact.
19# 22#
20# NOTE: The order in which things happen in this makefile is 23# NOTE: The order in which things happen in this makefile is
21 # -critical-. Do not rearrange this! 24 # -critical-. Do not rearrange this!
22 25
23all : $(TOPDIR)/.config 26all : $(TOPDIR)/.config
24 27
25ipks: $(OPIEDIR)/scripts/subst $(OPIEDIR)/scripts/filesubst FORCE $(TOPDIR)/.config 28ipks: $(OPIEDIR)/scripts/subst $(OPIEDIR)/scripts/filesubst FORCE $(TOPDIR)/.config
26 @find $(OPIEDIR)/ -type f -name \*.control | ( for ctrl in `cat`; do \ 29 @find $(OPIEDIR)/ -type f -name \*.control | ( for ctrl in `cat`; do \
27 prerm=`echo $$ctrl|sed -e 's,\.control$$,.prerm,'`; \ 30 prerm=`echo $$ctrl|sed -e 's,\.control$$,.prerm,'`; \
28 preinst=`echo $$ctrl|sed -e 's,\.control$$,.preinst,'`; \ 31 preinst=`echo $$ctrl|sed -e 's,\.control$$,.preinst,'`; \
29 postrm=`echo $$ctrl|sed -e 's,\.control$$,.postrm,'`; \ 32 postrm=`echo $$ctrl|sed -e 's,\.control$$,.postrm,'`; \
30 postinst=`echo $$ctrl|sed -e 's,\.control$$,.postinst,'`; \ 33 postinst=`echo $$ctrl|sed -e 's,\.control$$,.postinst,'`; \
31 echo "Building ipk of $$ctrl"; \ 34 echo "Building ipk of $$ctrl"; \
32 cd $(OPIEDIR); $(OPIEDIR)/scripts/mkipkg --subst=$(OPIEDIR)/scripts/subst --filesubst=$(OPIEDIR)/scripts/filesubst --control=$$ctrl --prerm=$$prerm --preinst=$$preinst --postrm=$$postrm --postinst=$$postinst --strip=$(STRIP) $(OPIEDIR); \ 35 cd $(OPIEDIR); $(OPIEDIR)/scripts/mkipkg --subst=$(OPIEDIR)/scripts/subst --filesubst=$(OPIEDIR)/scripts/filesubst --control=$$ctrl --prerm=$$prerm --preinst=$$preinst --postrm=$$postrm --postinst=$$postinst --strip=$(STRIP) $(OPIEDIR); \
33 done ) 36 done )
34 37
35$(TOPDIR)/.config : $(TOPDIR)/.depends.cfgs 38$(TOPDIR)/.config : $(TOPDIR)/.depends.cfgs
36 39
37all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(TOPDIR)/.depends.cfgs 40all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(TOPDIR)/.depends.cfgs
38 41
39clean-configs : 42clean-configs :
40 @echo "Wiping generated config.in files..." 43 @echo "Wiping generated config.in files..."
41 @-rm -f $(configs) 44 @-rm -f $(configs)
42 45
43ifneq ($(wildcard $(TOPDIR)/.depends.cfgs),) 46ifneq ($(wildcard $(TOPDIR)/.depends.cfgs),)
44 include $(TOPDIR)/.depends.cfgs 47 include $(TOPDIR)/.depends.cfgs
45endif 48endif
46 49
47all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(configs) 50all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(configs)
48 51
49$(TOPDIR)/.config: $(TOPDIR)/.depends.cfgs $(configs) 52$(TOPDIR)/.config: $(TOPDIR)/.depends.cfgs $(configs)
50 $(call descend,scripts/kconfig,conf) 53 $(call descend,scripts/kconfig,conf)
51 @if [ ! -e $@ ]; then \ 54 @if [ ! -e $@ ]; then \
52 cp $(TOPDIR)/def-configs/opie $@; \ 55 cp $(TOPDIR)/def-configs/opie $@; \
53 fi; 56 fi;
54 @$(MAKE) -C scripts/kconfig conf; 57 @$(MAKE) -C scripts/kconfig conf;
55 ./scripts/kconfig/conf -s ./config.in 58 ./scripts/kconfig/conf -s ./config.in
56 59
57# config rules must have the $(configs) var defined 60# config rules must have the $(configs) var defined
58# at the time that they run. we must ensure that .depends.cfgs 61# at the time that they run. we must ensure that .depends.cfgs
59# is built and included by the time we reach this point. 62# is built and included by the time we reach this point.
60 63
61xconfig : 64xconfig :
62 $(call descend,scripts/kconfig,qconf) 65 $(call descend,scripts/kconfig,qconf)
63 LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(TOPDIR)/scripts/kconfig \ 66 LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(TOPDIR)/scripts/kconfig \
64 ./scripts/kconfig/qconf ./config.in 67 ./scripts/kconfig/qconf ./config.in
65 68
66menuconfig : scripts/lxdialog/lxdialog 69menuconfig : scripts/lxdialog/lxdialog
67 $(call descend,scripts/kconfig,mconf) 70 $(call descend,scripts/kconfig,mconf)
68 ./scripts/kconfig/mconf ./config.in 71 ./scripts/kconfig/mconf ./config.in
69 72
70config : 73config :
71 $(call descend,scripts/kconfig,conf) 74 $(call descend,scripts/kconfig,conf)
72 ./scripts/kconfig/conf ./config.in 75 ./scripts/kconfig/conf ./config.in
73 76
74oldconfig : 77oldconfig :
75 $(call descend,scripts/kconfig,conf) 78 $(call descend,scripts/kconfig,conf)
76 ./scripts/kconfig/conf -o ./config.in 79 ./scripts/kconfig/conf -o ./config.in
77 80
78randconfig : 81randconfig :
79 $(call descend,scripts/kconfig,conf) 82 $(call descend,scripts/kconfig,conf)
80 ./scripts/kconfig/conf -r ./config.in 83 ./scripts/kconfig/conf -r ./config.in
81 84
82allyesconfig : 85allyesconfig :
83 $(call descend,scripts/kconfig,conf) 86 $(call descend,scripts/kconfig,conf)
84 ./scripts/kconfig/conf -y ./config.in 87 ./scripts/kconfig/conf -y ./config.in
85 88
86allnoconfig : 89allnoconfig :
87 $(call descend,scripts/kconfig,conf) 90 $(call descend,scripts/kconfig,conf)
88 ./scripts/kconfig/conf -n ./config.in 91 ./scripts/kconfig/conf -n ./config.in
89 92
90defconfig : 93defconfig :
91 $(call descend,scripts/kconfig,conf) 94 $(call descend,scripts/kconfig,conf)
92 ./scripts/kconfig/conf -d ./config.in 95 ./scripts/kconfig/conf -d ./config.in
93 96
94 97
95export 98export
96 99
97ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) 100ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
98 101
99export include-config := 1 102export include-config := 1
100 103
101-include $(TOPDIR)/.config 104-include $(TOPDIR)/.config
102-include $(TOPDIR)/.depends 105-include $(TOPDIR)/.depends
103endif 106endif
104 107
105-include $(TOPDIR)/.config.cmd 108-include $(TOPDIR)/.config.cmd
106 109
107SUBDIRS = $(subdir-y) 110SUBDIRS = $(subdir-y)
108 111
109all clean install ipk: $(SUBDIRS) 112all clean install ipk: $(SUBDIRS)
110 113
111lupdate lrelease: 114lupdate lrelease:
112 @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done; 115 @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done;
113 116
114opie-lupdate opie-lrelease: 117opie-lupdate opie-lrelease:
115 @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done; 118 @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done;
116 119
117$(subdir-y) : $(if $(CONFIG_LIBQPE),$(QTDIR)/stamp-headers $(OPIEDIR)/stamp-headers) \ 120$(subdir-y) : $(if $(CONFIG_LIBQPE),$(QTDIR)/stamp-headers $(OPIEDIR)/stamp-headers) \
118 $(if $(CONFIG_LIBQPE-X11),$(QTDIR)/stamp-headers-x11 $(OPIEDIR)/stamp-headers-x11 ) \ 121 $(if $(CONFIG_LIBQPE-X11),$(QTDIR)/stamp-headers-x11 $(OPIEDIR)/stamp-headers-x11 ) \
119 $(TOPDIR)/library/custom.h 122 $(TOPDIR)/library/custom.h
120 123
121clean : $(TOPDIR)/.config 124clean : $(TOPDIR)/.config
122 125
123apidox : doc/generate_apidox 126apidox : doc/generate_apidox
124 127
125include $(TOPDIR)/Rules.make 128include $(TOPDIR)/Rules.make