|
|
|
@@ -1,16 +1,18 @@ |
| |
1 | .PHONY: FORCE |
| |
2 | |
1 | $(configs) : |
3 | $(configs) : |
2 | $(call makecfg,$@) |
4 | $(call makecfg,$@) |
3 | |
5 | |
4 | $(TOPDIR)/gen.pro : $(TOPDIR)/.config |
6 | $(TOPDIR)/gen.pro : $(TOPDIR)/.config |
5 | echo > $@ |
7 | echo > $@ |
6 | ifneq ($(CONFIG_DEBUG),) |
8 | ifneq ($(CONFIG_DEBUG),) |
7 | echo CONFIG += debug >> $@ |
9 | echo CONFIG += debug >> $@ |
8 | echo CONFIG -= release >> $@ |
10 | echo CONFIG -= release >> $@ |
9 | else |
11 | else |
10 | echo CONFIG -= debug >> $@ |
12 | echo CONFIG -= debug >> $@ |
11 | echo CONFIG += release >> $@ |
13 | echo CONFIG += release >> $@ |
12 | endif |
14 | endif |
13 | |
15 | |
14 | $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages |
16 | $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages |
15 | @echo Generating dependency information... |
17 | @echo Generating dependency information... |
16 | # add to subdir-y, and add descend rules |
18 | # add to subdir-y, and add descend rules |
@@ -85,30 +87,48 @@ $(OPIEDIR)/stamp-headers-x11 : |
85 | touch $@ |
87 | touch $@ |
86 | |
88 | |
87 | $(TOPDIR)/library/custom.h : $(TOPDIR)/.config |
89 | $(TOPDIR)/library/custom.h : $(TOPDIR)/.config |
88 | @-rm -f $@ |
90 | @-rm -f $@ |
89 | @$(if $(patsubst "%",%,$(CONFIG_CUSTOMFILE)),\ |
91 | @$(if $(patsubst "%",%,$(CONFIG_CUSTOMFILE)),\ |
90 | ln -sf $(patsubst "%",%,$(CONFIG_CUSTOMFILE)) $@) |
92 | ln -sf $(patsubst "%",%,$(CONFIG_CUSTOMFILE)) $@) |
91 | @touch $@ |
93 | @touch $@ |
92 | |
94 | |
93 | $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/conf scripts/kconfig/conf $(TOPDIR)/scripts/kconfig/mconf scripts/kconfig/mconf $(TOPDIR)/scripts/kconfig/qconf scripts/kconfig/qconf $(TOPDIR)/qmake/qmake : |
95 | $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/conf scripts/kconfig/conf $(TOPDIR)/scripts/kconfig/mconf scripts/kconfig/mconf $(TOPDIR)/scripts/kconfig/qconf scripts/kconfig/qconf $(TOPDIR)/qmake/qmake : |
94 | $(call descend,$(shell dirname $@),$(shell basename $@)) |
96 | $(call descend,$(shell dirname $@),$(shell basename $@)) |
95 | |
97 | |
96 | $(TOPDIR)/qmake/qmake : $(TOPDIR)/mkspecs/default |
98 | $(TOPDIR)/qmake/qmake : $(TOPDIR)/mkspecs/default |
97 | |
99 | |
98 | $(TOPDIR)/mkspecs/default : |
100 | $(TOPDIR)/mkspecs/default : |
99 | ln -sf linux-g++ $@ |
101 | ln -sf linux-g++ $@ |
100 | |
102 | |
| |
103 | $(TOPDIR)/scripts/subst : FORCE |
| |
104 | @( \ |
| |
105 | echo 's,\$$QPE_VERSION,$(QPE_VERSION),g'; \ |
| |
106 | echo 's,\$$QTE_VERSION,$(QTE_VERSION),g'; \ |
| |
107 | echo 's,\$$QTE_REVISION,$(QTE_REVISION),g'; \ |
| |
108 | echo 's,\$$SUB_VERSION,$(SUB_VERSION),g'; \ |
| |
109 | echo 's,\$$QTE_BASEVERSION,$(QTE_BASEVERSION),g'; \ |
| |
110 | ) > $@ || ( rm -f $@; exit 1 ) |
| |
111 | |
| |
112 | $(TOPDIR)/scripts/filesubst : FORCE |
| |
113 | @( \ |
| |
114 | echo 's,\$$OPIEDIR,$(prefix),g'; \ |
| |
115 | echo 's,\$$QTDIR,$(prefix),g'; \ |
| |
116 | echo 's,^root/,/,g'; \ |
| |
117 | echo 's,^etc/,/etc/,g'; \ |
| |
118 | echo 's,^lib/,$(prefix)/lib/,g'; \ |
| |
119 | ) > $@ || ( rm -f $@; exit 1 ) |
| |
120 | |
101 | ## general rules ## |
121 | ## general rules ## |
102 | |
122 | |
103 | define descend |
123 | define descend |
104 | $(MAKE) $(if $(QMAKE),QMAKE=$(QMAKE)) -C $(1) $(2) |
124 | $(MAKE) $(if $(QMAKE),QMAKE=$(QMAKE)) -C $(1) $(2) |
105 | endef |
125 | endef |
106 | |
126 | |
107 | define makefilegen |
127 | define makefilegen |
108 | cd $(if $(1),$(shell dirname $(1))); $(TOPDIR)/qmake/qmake $(3) -o $(if $(1),$(shell basename $(1))) `cat $(OPIEDIR)/packages | grep " \`echo $(1)|sed -e 's,/Makefile$$,,'\`" | \ |
128 | cd $(if $(1),$(shell dirname $(1))); $(TOPDIR)/qmake/qmake $(3) -o $(if $(1),$(shell basename $(1))) `cat $(OPIEDIR)/packages | grep " \`echo $(1)|sed -e 's,/Makefile$$,,'\`" | \ |
109 | head -1 | awk '{print $$3}'` |
129 | head -1 | awk '{print $$3}'` |
110 | endef |
130 | endef |
111 | |
131 | |
112 | define makecfg |
132 | define makecfg |
113 | $(TOPDIR)/scripts/makecfg.pl $1 $(OPIEDIR) |
133 | $(TOPDIR)/scripts/makecfg.pl $1 $(OPIEDIR) |
114 | endef |
134 | endef |
|