-rw-r--r-- | Rules.make | 12 | ||||
-rw-r--r-- | config.in | 4 | ||||
-rw-r--r-- | include.pro | 2 |
3 files changed, 17 insertions, 1 deletions
@@ -1,31 +1,41 @@ | |||
1 | ## targets ## | 1 | ## targets ## |
2 | 2 | ||
3 | $(configs) : | 3 | $(configs) : |
4 | $(call makecfg,$@) | 4 | $(call makecfg,$@) |
5 | 5 | ||
6 | $(TOPDIR)/gen.pro : $(TOPDIR)/.config | ||
7 | echo > $@ | ||
8 | ifneq ($(CONFIG_DEBUG),) | ||
9 | echo CONFIG += debug >> $@ | ||
10 | echo CONFIG -= release >> $@ | ||
11 | else | ||
12 | echo CONFIG -= debug >> $@ | ||
13 | echo CONFIG += release >> $@ | ||
14 | endif | ||
15 | |||
6 | $(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 |
7 | @echo Generating dependency information... | 17 | @echo Generating dependency information... |
8 | # add to subdir-y, and add descend rules | 18 | # add to subdir-y, and add descend rules |
9 | @cat $(TOPDIR)/packages | grep -v '^#' | \ | 19 | @cat $(TOPDIR)/packages | grep -v '^#' | \ |
10 | awk '{print \ | 20 | awk '{print \ |
11 | ".PHONY : " $$2 "\n" \ | 21 | ".PHONY : " $$2 "\n" \ |
12 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ | 22 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ |
13 | print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends | 23 | print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends |
14 | cat $(TOPDIR)/packages | grep -v '^#' | \ | 24 | cat $(TOPDIR)/packages | grep -v '^#' | \ |
15 | perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE)\n\t\$$(call makefilegen,\$$@)\n\n"; }' \ | 25 | perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE) \$$(OPIEDIR)/gen.pro\n\t\$$(call makefilegen,\$$@)\n\n"; }' \ |
16 | >> $(TOPDIR)/.depends | 26 | >> $(TOPDIR)/.depends |
17 | # interpackage dependency generation | 27 | # interpackage dependency generation |
18 | @cat $(TOPDIR)/packages | \ | 28 | @cat $(TOPDIR)/packages | \ |
19 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends | 29 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends |
20 | 30 | ||
21 | $(TOPDIR)/.depends.cfgs: | 31 | $(TOPDIR)/.depends.cfgs: |
22 | # config.in interdependencies | 32 | # config.in interdependencies |
23 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs | 33 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs |
24 | @cat dirs | ( for i in `cat`; do if [ "`cat dirs|grep $$i 2>/dev/null|wc -l`" -ne "1" ]; then deps=`cat dirs|grep $$i| grep -v "^$$i$$"|for i in \`cat|sed -e's,^$(TOPDIR)/,$$(TOPDIR)/,g'\`; do echo $$i/config.in; done`; echo `echo $$i/config.in|sed -e 's,^$(TOPDIR)/,$$(TOPDIR)/,'` : $$deps; fi; done ) >> $@ | 34 | @cat dirs | ( for i in `cat`; do if [ "`cat dirs|grep $$i 2>/dev/null|wc -l`" -ne "1" ]; then deps=`cat dirs|grep $$i| grep -v "^$$i$$"|for i in \`cat|sed -e's,^$(TOPDIR)/,$$(TOPDIR)/,g'\`; do echo $$i/config.in; done`; echo `echo $$i/config.in|sed -e 's,^$(TOPDIR)/,$$(TOPDIR)/,'` : $$deps; fi; done ) >> $@ |
25 | @-rm -f dirs | 35 | @-rm -f dirs |
26 | 36 | ||
27 | $(QTDIR)/stamp-headers : | 37 | $(QTDIR)/stamp-headers : |
28 | @-rm -f $@* | 38 | @-rm -f $@* |
29 | ( cd $(QTDIR)/include; \ | 39 | ( cd $(QTDIR)/include; \ |
30 | $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ | 40 | $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ |
31 | qcopchannel_qws.h qwindowsystem_qws.h \ | 41 | qcopchannel_qws.h qwindowsystem_qws.h \ |
@@ -25,32 +25,36 @@ choice | |||
25 | 25 | ||
26 | config TARGET_SHARP | 26 | config TARGET_SHARP |
27 | boolean "Sharp Zaurus SL-5x00 - stock" | 27 | boolean "Sharp Zaurus SL-5x00 - stock" |
28 | 28 | ||
29 | # config TARGET_OZ | 29 | # config TARGET_OZ |
30 | # boolean "Sharp Zaurus SL-5x00 - OpenZaurus" | 30 | # boolean "Sharp Zaurus SL-5x00 - OpenZaurus" |
31 | 31 | ||
32 | config TARGET_IPAQ | 32 | config TARGET_IPAQ |
33 | boolean "Ipaq" | 33 | boolean "Ipaq" |
34 | 34 | ||
35 | endchoice | 35 | endchoice |
36 | 36 | ||
37 | config OPTIMIZE | 37 | config OPTIMIZE |
38 | boolean "Use optimizations" | 38 | boolean "Use optimizations" |
39 | default "y" if ! TARGET_X86 | 39 | default "y" if ! TARGET_X86 |
40 | 40 | ||
41 | config DEBUG | ||
42 | boolean "Enable debug builds" | ||
43 | default "n" | ||
44 | |||
41 | config SPECFILE | 45 | config SPECFILE |
42 | string | 46 | string |
43 | default "qws/linux-generic-g++" if TARGET_X86 && (! X11) | 47 | default "qws/linux-generic-g++" if TARGET_X86 && (! X11) |
44 | default "linux-g++" if TARGET_X86 && X11 | 48 | default "linux-g++" if TARGET_X86 && X11 |
45 | default "qws/linux-sharp-g++" if TARGET_SHARP && (! X11) | 49 | default "qws/linux-sharp-g++" if TARGET_SHARP && (! X11) |
46 | default "linux-g++" if TARGET_SHARP && X11 | 50 | default "linux-g++" if TARGET_SHARP && X11 |
47 | # default "linux-oz-g++" if TARGET_OZ | 51 | # default "linux-oz-g++" if TARGET_OZ |
48 | default "qws/linux-ipaq-g++" if TARGET_IPAQ && (! X11) | 52 | default "qws/linux-ipaq-g++" if TARGET_IPAQ && (! X11) |
49 | default "linux-g++" if TARGET_IPAQ && X11 | 53 | default "linux-g++" if TARGET_IPAQ && X11 |
50 | 54 | ||
51 | config CUSTOMFILE | 55 | config CUSTOMFILE |
52 | string | 56 | string |
53 | default "custom-ipaq.h" if TARGET_IPAQ | 57 | default "custom-ipaq.h" if TARGET_IPAQ |
54 | default "custom-sharp.h" if TARGET_SHARP | 58 | default "custom-sharp.h" if TARGET_SHARP |
55 | 59 | ||
56 | 60 | ||
diff --git a/include.pro b/include.pro index da2da04..4f1144f 100644 --- a/include.pro +++ b/include.pro | |||
@@ -55,16 +55,18 @@ root.files = root/* | |||
55 | INSTALLS += root | 55 | INSTALLS += root |
56 | 56 | ||
57 | # new targets | 57 | # new targets |
58 | 58 | ||
59 | lupdate.target = lupdate | 59 | lupdate.target = lupdate |
60 | lupdate.commands = lupdate -noobsolete $(PRO) | 60 | lupdate.commands = lupdate -noobsolete $(PRO) |
61 | 61 | ||
62 | lrelease.target = lrelease | 62 | lrelease.target = lrelease |
63 | lrelease.commands = lrelease $(PRO) | 63 | lrelease.commands = lrelease $(PRO) |
64 | 64 | ||
65 | ipk.target = ipk | 65 | ipk.target = ipk |
66 | ipk.commands = tmp=`mktemp -d /tmp/ipkg-opie.XXXXXXXXXX` && ( $(MAKE) INSTALL_ROOT="$$$$tmp" install && ipkg-build $$$$tmp; rm -rf $$$$tmp; ) | 66 | ipk.commands = tmp=`mktemp -d /tmp/ipkg-opie.XXXXXXXXXX` && ( $(MAKE) INSTALL_ROOT="$$$$tmp" install && ipkg-build $$$$tmp; rm -rf $$$$tmp; ) |
67 | 67 | ||
68 | QMAKE_EXTRA_UNIX_TARGETS += lupdate lrelease ipk | 68 | QMAKE_EXTRA_UNIX_TARGETS += lupdate lrelease ipk |
69 | QMAKE_LFLAGS += -Wl,-rpath=$$prefix/lib | 69 | QMAKE_LFLAGS += -Wl,-rpath=$$prefix/lib |
70 | QMAKE_LIBDIR += $(OPIEDIR)/lib | 70 | QMAKE_LIBDIR += $(OPIEDIR)/lib |
71 | |||
72 | include ( $(OPIEDIR)/gen.pro ) | ||