summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Rules.make12
-rw-r--r--config.in4
-rw-r--r--include.pro2
3 files changed, 17 insertions, 1 deletions
diff --git a/Rules.make b/Rules.make
index 1e4b205..11bfa55 100644
--- a/Rules.make
+++ b/Rules.make
@@ -3,6 +3,16 @@
$(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
@@ -12,7 +22,7 @@ $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)
"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 | \
diff --git a/config.in b/config.in
index 8559e73..97e1e80 100644
--- a/config.in
+++ b/config.in
@@ -38,6 +38,10 @@ 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)
diff --git a/include.pro b/include.pro
index da2da04..4f1144f 100644
--- a/include.pro
+++ b/include.pro
@@ -68,3 +68,5 @@ ipk.commands = tmp=`mktemp -d /tmp/ipkg-opie.XXXXXXXXXX` && ( $(MAKE) INSTALL_RO
QMAKE_EXTRA_UNIX_TARGETS += lupdate lrelease ipk
QMAKE_LFLAGS += -Wl,-rpath=$$prefix/lib
QMAKE_LIBDIR += $(OPIEDIR)/lib
+
+include ( $(OPIEDIR)/gen.pro )