-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,39 +1,49 @@ ## targets ## $(configs) : $(call makecfg,$@) +$(TOPDIR)/gen.pro : $(TOPDIR)/.config + echo > $@ +ifneq ($(CONFIG_DEBUG),) + echo CONFIG += debug >> $@ + echo CONFIG -= release >> $@ +else + echo CONFIG -= debug >> $@ + echo CONFIG += release >> $@ +endif + $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages @echo Generating dependency information... # add to subdir-y, and add descend rules @cat $(TOPDIR)/packages | grep -v '^#' | \ awk '{print \ ".PHONY : " $$2 "\n" \ "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends cat $(TOPDIR)/packages | grep -v '^#' | \ - 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"; }' \ + 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"; }' \ >> $(TOPDIR)/.depends # interpackage dependency generation @cat $(TOPDIR)/packages | \ $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends $(TOPDIR)/.depends.cfgs: # config.in interdependencies @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs @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 ) >> $@ @-rm -f dirs $(QTDIR)/stamp-headers : @-rm -f $@* ( cd $(QTDIR)/include; \ $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ qcopchannel_qws.h qwindowsystem_qws.h \ qfontmanager_qws.h qwsdefaultdecoration_qws.h)) touch $@ $(QTDIR)/stamp-headers-x11 : @-rm -f $@* cd $(QTDIR)/include; $(patsubst %,ln -sf $(OPIEDIR)/x11/libqpe-x11/qt/%;,qgfx_qws.h qwsmouse_qws.h qcopchannel_qws.h qwindowsystem_qws.h qfontmanager_qws.h qwsdefaultdecoration_qws.h) touch $@ @@ -17,48 +17,52 @@ choice prompt "Target Machine" default TARGET_X86 help Please select the architecture of the machine you will be building the OpenZaurus buildroot for. config TARGET_X86 boolean "Intel X86" config TARGET_SHARP boolean "Sharp Zaurus SL-5x00 - stock" # config TARGET_OZ # boolean "Sharp Zaurus SL-5x00 - OpenZaurus" config TARGET_IPAQ boolean "Ipaq" endchoice config OPTIMIZE boolean "Use optimizations" default "y" if ! TARGET_X86 +config DEBUG + boolean "Enable debug builds" + default "n" + config SPECFILE string default "qws/linux-generic-g++" if TARGET_X86 && (! X11) default "linux-g++" if TARGET_X86 && X11 default "qws/linux-sharp-g++" if TARGET_SHARP && (! X11) default "linux-g++" if TARGET_SHARP && X11 # default "linux-oz-g++" if TARGET_OZ default "qws/linux-ipaq-g++" if TARGET_IPAQ && (! X11) default "linux-g++" if TARGET_IPAQ && X11 config CUSTOMFILE string default "custom-ipaq.h" if TARGET_IPAQ default "custom-sharp.h" if TARGET_SHARP config OPTIMIZATIONS string "Optimization flags" depends OPTIMIZE default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_IPAQ default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SHARP #config CROSS # string "Crosscompilation prefix" diff --git a/include.pro b/include.pro index da2da04..4f1144f 100644 --- a/include.pro +++ b/include.pro @@ -47,24 +47,26 @@ INSTALLS += apps # sounds, default path is $$prefix/sounds/$$TARGET sounds.path = $$prefix/sounds/$$TARGET sounds.files = sounds/* INSTALLS += sounds # anything in nonstandard paths root.path = / root.files = root/* INSTALLS += root # new targets lupdate.target = lupdate lupdate.commands = lupdate -noobsolete $(PRO) lrelease.target = lrelease lrelease.commands = lrelease $(PRO) ipk.target = ipk ipk.commands = tmp=`mktemp -d /tmp/ipkg-opie.XXXXXXXXXX` && ( $(MAKE) INSTALL_ROOT="$$$$tmp" install && ipkg-build $$$$tmp; rm -rf $$$$tmp; ) QMAKE_EXTRA_UNIX_TARGETS += lupdate lrelease ipk QMAKE_LFLAGS += -Wl,-rpath=$$prefix/lib QMAKE_LIBDIR += $(OPIEDIR)/lib + +include ( $(OPIEDIR)/gen.pro ) |