author | wimpie <wimpie> | 2004-04-02 18:34:55 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-04-02 18:34:55 (UTC) |
commit | 1d6b2100209fb63e737100c9f8f576bb26534e96 (patch) (unidiff) | |
tree | a622ace52548366a43f6a4712a9da2d95a81b6c5 | |
parent | 4ea2f227d3fb0d9591bb4f18555420ac47f3397d (diff) | |
download | opie-1d6b2100209fb63e737100c9f8f576bb26534e96.zip opie-1d6b2100209fb63e737100c9f8f576bb26534e96.tar.gz opie-1d6b2100209fb63e737100c9f8f576bb26534e96.tar.bz2 |
Added THREAD config flag (for compile agains threaded qt)
Added ipkg-mt target for packaging targets to -mt packages
speedup of ipkg by using bash substitution instead of grep/sed
-rw-r--r-- | Makefile | 23 | ||||
-rw-r--r-- | Rules.make | 7 |
2 files changed, 26 insertions, 4 deletions
@@ -1,90 +1,105 @@ | |||
1 | #!/usr/bin/make -f | 1 | #!/usr/bin/make -f |
2 | 2 | ||
3 | export TOPDIR:=$(OPIEDIR) | 3 | export TOPDIR:=$(OPIEDIR) |
4 | 4 | ||
5 | include $(TOPDIR)/Vars.make | 5 | include $(TOPDIR)/Vars.make |
6 | ifneq ($(wildcard $(TOPDIR)/Vars.local),) | 6 | ifneq ($(wildcard $(TOPDIR)/Vars.local),) |
7 | include $(TOPDIR)/Vars.local | 7 | include $(TOPDIR)/Vars.local |
8 | endif | 8 | endif |
9 | 9 | ||
10 | noconfig_targets := xconfig menuconfig config oldconfig randconfig \ | 10 | noconfig_targets := xconfig menuconfig config oldconfig randconfig \ |
11 | defconfig allyesconfig allnoconfig allmodconfig \ | 11 | defconfig allyesconfig allnoconfig allmodconfig \ |
12 | clean-configs $(TOPDIR)/scripts/subst $(TOPDIR)/scripts/filesubst \ | 12 | clean-configs $(TOPDIR)/scripts/subst $(TOPDIR)/scripts/filesubst \ |
13 | ipks | 13 | ipks |
14 | 14 | ||
15 | configs += $(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/pim/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/config.in $(TOPDIR)/noncore/todayplugins/config.in $(TOPDIR)/examples/config.in | 15 | configs += $(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/pim/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/config.in $(TOPDIR)/noncore/todayplugins/config.in $(TOPDIR)/examples/config.in |
16 | 16 | ||
17 | # $(TOPDIR)/.config depends on .depends.cfgs, as it depends on $(configs) | 17 | # $(TOPDIR)/.config depends on .depends.cfgs, as it depends on $(configs) |
18 | # in order to have a full set of config.in files. | 18 | # in order to have a full set of config.in files. |
19 | # .depends depends on $(TOPDIR)/.config | 19 | # .depends depends on $(TOPDIR)/.config |
20 | # everything else depends on .depends, to ensure the dependencies are | 20 | # everything else depends on .depends, to ensure the dependencies are |
21 | # intact. | 21 | # intact. |
22 | # | 22 | # |
23 | # NOTE: The order in which things happen in this makefile is | 23 | # NOTE: The order in which things happen in this makefile is |
24 | # -critical-. Do not rearrange this! | 24 | # -critical-. Do not rearrange this! |
25 | 25 | ||
26 | all : $(TOPDIR)/.config | 26 | all : $(TOPDIR)/.config |
27 | 27 | ||
28 | # | 28 | # |
29 | # The IPK creation is a very slow process. If you want to only create some | 29 | # The IPK creation is a very slow process. If you want to only create some |
30 | # IPKs, e.g. the ones in library, then do | 30 | # IPKs, e.g. the ones in library, then do |
31 | #make ipks IPK_START=library | 31 | #make ipks IPK_START=library |
32 | # and then only the *.control files in this directory will be processed | 32 | # and then only the *.control files in this directory will be processed |
33 | ipks: $(OPIEDIR)/scripts/subst $(OPIEDIR)/scripts/filesubst FORCE $(TOPDIR)/.config | 33 | ipks: $(OPIEDIR)/scripts/subst $(OPIEDIR)/scripts/filesubst FORCE $(TOPDIR)/.config |
34 | @find $(OPIEDIR)/$(IPK_START) -type f -name \*.control | ( for ctrl in `cat`; do \ | 34 | @find $(OPIEDIR)/$(IPK_START) -type f -name \*.control | ( for ctrl in `cat`; do \ |
35 | prerm=`echo $$ctrl|sed -e 's,\.control$$,.prerm,'`; \ | 35 | prerm=`echo $${ctrl/.control/.prerm}`; \ |
36 | preinst=`echo $$ctrl|sed -e 's,\.control$$,.preinst,'`; \ | 36 | preinst=`echo $${ctrl/.control/.preinst}`; \ |
37 | postrm=`echo $$ctrl|sed -e 's,\.control$$,.postrm,'`; \ | 37 | postrm=`echo $${ctrl/.control/.postrm}`; \ |
38 | postinst=`echo $$ctrl|sed -e 's,\.control$$,.postinst,'`; \ | 38 | postinst=`echo $${ctrl/.control/.postinst}`; \ |
39 | echo "Building ipk of $$ctrl"; \ | 39 | echo "Building ipk of $$ctrl"; \ |
40 | 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); \ | 40 | 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); \ |
41 | done ) | 41 | done ) |
42 | 42 | ||
43 | ipks-mt: $(OPIEDIR)/scripts/subst $(OPIEDIR)/scripts/filesubst FORCE $(TOPDIR)/.config | ||
44 | @> $(OPIEDIR)/AllThreadedPackages | ||
45 | @find $(OPIEDIR)/ -type f -name \*.control | grep -v -- "-mt" | while read ctrl ; do \ | ||
46 | grep "Package[ ]*:" $${ctrl} | sed "s+Package[ ]*:[ ]*++"; \ | ||
47 | done | sort | uniq >> $(OPIEDIR)/AllThreadedPackages | ||
48 | @find $(OPIEDIR)/ -type f -name \*.control | while read ctrl ; do \ | ||
49 | echo "Converting $$ctrl to -mt package"; \ | ||
50 | nctrl=`$(OPIEDIR)/scripts/tothreaded $$ctrl $(OPIEDIR)/AllThreadedPackages`; \ | ||
51 | echo "Building ipk of $$ctrl"; \ | ||
52 | [ -n $$nctrl ] && cd $(OPIEDIR) && $(OPIEDIR)/scripts/mkipkg --subst=$(OPIEDIR)/scripts/subst --filesubst=$(OPIEDIR)/scripts/filesubst --control=$$nctrl --prerm=$${nctrl/\.control$$/.prerm/} --preinst=$${nctrl/\.control$$/.preinst/} --postrm=$${nctrl/\.control$$/.postrm/} --postinst=$${nctrl/\.control$$/.postinst/} --strip=$(STRIP) $(OPIEDIR); \ | ||
53 | done | ||
54 | @rm -f $(OPIEDIR)/AllThreadedPackages | ||
55 | |||
56 | FORCE: | ||
57 | |||
43 | $(TOPDIR)/.config : $(TOPDIR)/.depends.cfgs | 58 | $(TOPDIR)/.config : $(TOPDIR)/.depends.cfgs |
44 | 59 | ||
45 | all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(TOPDIR)/.depends.cfgs | 60 | all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(TOPDIR)/.depends.cfgs |
46 | 61 | ||
47 | clean-configs : | 62 | clean-configs : |
48 | @echo "Wiping generated config.in files..." | 63 | @echo "Wiping generated config.in files..." |
49 | @-rm -f $(configs) | 64 | @-rm -f $(configs) |
50 | 65 | ||
51 | ifneq ($(wildcard $(TOPDIR)/.depends.cfgs),) | 66 | ifneq ($(wildcard $(TOPDIR)/.depends.cfgs),) |
52 | include $(TOPDIR)/.depends.cfgs | 67 | include $(TOPDIR)/.depends.cfgs |
53 | endif | 68 | endif |
54 | 69 | ||
55 | all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(configs) | 70 | all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(configs) |
56 | 71 | ||
57 | $(TOPDIR)/.config: $(TOPDIR)/.depends.cfgs $(configs) | 72 | $(TOPDIR)/.config: $(TOPDIR)/.depends.cfgs $(configs) |
58 | $(call descend,scripts/kconfig,conf) | 73 | $(call descend,scripts/kconfig,conf) |
59 | @if [ ! -e $@ ]; then \ | 74 | @if [ ! -e $@ ]; then \ |
60 | cp $(TOPDIR)/def-configs/opie $@; \ | 75 | cp $(TOPDIR)/def-configs/opie $@; \ |
61 | fi | 76 | fi |
62 | @$(MAKE) -C scripts/kconfig conf | 77 | @$(MAKE) -C scripts/kconfig conf |
63 | ./scripts/kconfig/conf -s ./config.in | 78 | ./scripts/kconfig/conf -s ./config.in |
64 | 79 | ||
65 | export | 80 | export |
66 | 81 | ||
67 | ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) | 82 | ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) |
68 | 83 | ||
69 | export include-config := 1 | 84 | export include-config := 1 |
70 | 85 | ||
71 | -include $(TOPDIR)/.config | 86 | -include $(TOPDIR)/.config |
72 | -include $(TOPDIR)/.depends | 87 | -include $(TOPDIR)/.depends |
73 | endif | 88 | endif |
74 | 89 | ||
75 | -include $(TOPDIR)/.config.cmd | 90 | -include $(TOPDIR)/.config.cmd |
76 | 91 | ||
77 | SUBDIRS = $(subdir-y) | 92 | SUBDIRS = $(subdir-y) |
78 | 93 | ||
79 | all clean install ipk: $(SUBDIRS) | 94 | all clean install ipk: $(SUBDIRS) |
80 | 95 | ||
81 | lupdate lrelease: | 96 | lupdate lrelease: |
82 | @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done | 97 | @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done |
83 | 98 | ||
84 | opie-lupdate opie-lrelease messages: | 99 | opie-lupdate opie-lrelease messages: |
85 | @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done; | 100 | @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done; |
86 | 101 | ||
87 | # from kde | 102 | # from kde |
88 | qtmessages: | 103 | qtmessages: |
89 | cd $(QTDIR)/src ; \ | 104 | cd $(QTDIR)/src ; \ |
90 | sed -e "s,#define,," xml/qxml.cpp > qxml_clean.cpp ;\ | 105 | sed -e "s,#define,," xml/qxml.cpp > qxml_clean.cpp ;\ |
@@ -1,66 +1,73 @@ | |||
1 | .phony: force | 1 | .phony: force |
2 | force: | 2 | force: |
3 | 3 | ||
4 | $(configs) : | 4 | $(configs) : |
5 | $(call makecfg,$@) | 5 | $(call makecfg,$@) |
6 | 6 | ||
7 | $(TOPDIR)/gen.pro : $(TOPDIR)/.config | 7 | $(TOPDIR)/gen.pro : $(TOPDIR)/.config |
8 | echo > $@ | 8 | echo > $@ |
9 | # added for threaded version | ||
10 | ifneq ($(CONFIG_THREADED),) | ||
11 | echo CONFIG += thread >> $@ | ||
12 | else | ||
13 | echo CONFIG -= thread >> $@ | ||
14 | endif | ||
9 | ifneq ($(CONFIG_DEBUG),) | 15 | ifneq ($(CONFIG_DEBUG),) |
10 | echo CONFIG += debug >> $@ | 16 | echo CONFIG += debug >> $@ |
11 | echo CONFIG -= release >> $@ | 17 | echo CONFIG -= release >> $@ |
12 | echo DEFINES += "QT_COMPONENT_DEBUG=2" >> $@ | 18 | echo DEFINES += "QT_COMPONENT_DEBUG=2" >> $@ |
13 | echo DEFINES += QT_DEBUG >> $@ | 19 | echo DEFINES += QT_DEBUG >> $@ |
14 | else | 20 | else |
15 | echo CONFIG -= debug >> $@ | 21 | echo CONFIG -= debug >> $@ |
16 | echo CONFIG += release >> $@ | 22 | echo CONFIG += release >> $@ |
17 | echo DEFINES += "OPIE_NO_DEBUG" >> $@ | 23 | echo DEFINES += "OPIE_NO_DEBUG" >> $@ |
18 | endif | 24 | endif |
25 | |||
19 | ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3 | 26 | ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3 |
20 | echo CONFIG -= qt3 >> $@ | 27 | echo CONFIG -= qt3 >> $@ |
21 | else | 28 | else |
22 | echo CONFIG += qt3 >> $@ | 29 | echo CONFIG += qt3 >> $@ |
23 | endif | 30 | endif |
24 | ifneq ($(CONFIG_QUICK_LAUNCH),) | 31 | ifneq ($(CONFIG_QUICK_LAUNCH),) |
25 | echo contains\( CONFIG, quick-app \) \{ >> $@ | 32 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
26 | echo CONFIG -= quick-app >> $@ | 33 | echo CONFIG -= quick-app >> $@ |
27 | echo CONFIG += quick-app-lib >> $@ | 34 | echo CONFIG += quick-app-lib >> $@ |
28 | echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@ | 35 | echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@ |
29 | echo \} >> $@ | 36 | echo \} >> $@ |
30 | else | 37 | else |
31 | echo contains\( CONFIG, quick-app \) \{ >> $@ | 38 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
32 | echo CONFIG -= quick-app >> $@ | 39 | echo CONFIG -= quick-app >> $@ |
33 | echo CONFIG += quick-app-bin >> $@ | 40 | echo CONFIG += quick-app-bin >> $@ |
34 | echo \} >> $@ | 41 | echo \} >> $@ |
35 | endif | 42 | endif |
36 | ifeq ($(CONFIG_SQL_PIM_BACKEND),y) | 43 | ifeq ($(CONFIG_SQL_PIM_BACKEND),y) |
37 | echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ | 44 | echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ |
38 | else | 45 | else |
39 | echo ENABLE_SQL_PIM_BACKEND=n >> $@ | 46 | echo ENABLE_SQL_PIM_BACKEND=n >> $@ |
40 | endif | 47 | endif |
41 | ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y) | 48 | ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y) |
42 | echo CONFIG += no-override >> $@ | 49 | echo CONFIG += no-override >> $@ |
43 | endif | 50 | endif |
44 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) | 51 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) |
45 | echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ | 52 | echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ |
46 | endif | 53 | endif |
47 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) | 54 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) |
48 | echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ | 55 | echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ |
49 | endif | 56 | endif |
50 | ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) | 57 | ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) |
51 | echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ | 58 | echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ |
52 | endif | 59 | endif |
53 | ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) | 60 | ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) |
54 | echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ | 61 | echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ |
55 | endif | 62 | endif |
56 | ifeq ($(CONFIG_OPIE_HIGH_RES_SMALL_PHY),y) | 63 | ifeq ($(CONFIG_OPIE_HIGH_RES_SMALL_PHY),y) |
57 | echo DEFINES += OPIE_HIGH_RES_SMALL_PHY >> $@ | 64 | echo DEFINES += OPIE_HIGH_RES_SMALL_PHY >> $@ |
58 | endif | 65 | endif |
59 | ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) | 66 | ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) |
60 | echo DEFINES += OPIE_NEW_MALLOC >> $@ | 67 | echo DEFINES += OPIE_NEW_MALLOC >> $@ |
61 | endif | 68 | endif |
62 | ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) | 69 | ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) |
63 | echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ | 70 | echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ |
64 | endif | 71 | endif |
65 | echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ | 72 | echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ |
66 | echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ | 73 | echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ |