summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-03-26 17:36:46 (UTC)
committer mickeyl <mickeyl>2004-03-26 17:36:46 (UTC)
commit5df13d7b2acd41c54bed6253afac827bc864ea5a (patch) (side-by-side diff)
tree8c3672a0be7f09094c0ec6658f98fd762108c17f
parent5d2442fc6e0fb992b9fe3998cc7b9ee6dffb8e2b (diff)
downloadopie-5df13d7b2acd41c54bed6253afac827bc864ea5a.zip
opie-5df13d7b2acd41c54bed6253afac827bc864ea5a.tar.gz
opie-5df13d7b2acd41c54bed6253afac827bc864ea5a.tar.bz2
conditionally link against -lopiedb, i.e. only when ENABLE_SQL_PIM_BACKEND=y
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Rules.make7
-rw-r--r--include.pro2
-rw-r--r--libopie2/opiepim/opiepim.pro7
3 files changed, 12 insertions, 4 deletions
diff --git a/Rules.make b/Rules.make
index 1db17ee..8cacfb0 100644
--- a/Rules.make
+++ b/Rules.make
@@ -1,128 +1,133 @@
.phony: force
force:
$(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
ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3
echo CONFIG -= qt3 >> $@
else
echo CONFIG += qt3 >> $@
endif
ifneq ($(CONFIG_QUICK_LAUNCH),)
echo contains\( CONFIG, quick-app \) \{ >> $@
echo CONFIG -= quick-app >> $@
echo CONFIG += quick-app-lib >> $@
echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@
echo \} >> $@
else
echo contains\( CONFIG, quick-app \) \{ >> $@
echo CONFIG -= quick-app >> $@
echo CONFIG += quick-app-bin >> $@
echo \} >> $@
-endif
+endif
+ifeq ($(CONFIG_SQL_PIM_BACKEND),y)
+ echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@
+else
+ echo ENABLE_SQL_PIM_BACKEND=n >> $@
+endif
ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y)
echo CONFIG += no-override >> $@
endif
ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y)
echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@
endif
ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y)
echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@
endif
ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y)
echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@
endif
ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y)
echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@
endif
ifeq ($(CONFIG_OPIE_HIGH_RES_SMALL_PHY),y)
echo DEFINES += OPIE_HIGH_RES_SMALL_PHY >> $@
endif
ifeq ($(CONFIG_OPIE_NEW_ALLOC),y)
echo DEFINES += OPIE_NEW_MALLOC >> $@
endif
ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y)
echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@
endif
echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@
echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@
$(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) \$$(OPIEDIR)/gen.pro \$$(OPIEDIR)/.config\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 $(QTDIR)/stamp-headers*
( 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 $(QTDIR)/stamp-headers*
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 $@
$(OPIEDIR)/stamp-headers :
@-rm -f $(OPIEDIR)/stamp-headers*
mkdir -p $(TOPDIR)/include/qpe \
$(TOPDIR)/include/qtopia \
$(TOPDIR)/include/opie \
$(TOPDIR)/include/opie2 \
$(TOPDIR)/include/qtopia/private \
$(TOPDIR)/include/sl
( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; )
( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; )
( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; )
# libopie1
( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; )
( cd include/opie && ln -sf ../../libopie/pim/*.h .; )
( cd include/opie && ln -sf ../../libopie/big-screen/*.h .; )
# libopie2
( cd include/opie2 && ln -sf ../../libopie2/opiecore/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opiecore/device/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opiemm/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opiedb/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opienet/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opiepim/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/backends/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opiepim/ui/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opieui/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opieui/fileselector/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opieui/big-screen/*.h .; )
# auxilliary libraries
( cd include/opie2 && ln -sf ../../libqtaux/*.h .; )
( cd include/sl && ln -sf ../../libslcompat/*.h .; )
# all
( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \
ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done )
( cd include/opie2; for generatedHeader in `cd ../../libopie2/opieui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \
ln -sf ../../libopie2/opieui/$$generatedHeader $$generatedHeader; done )
diff --git a/include.pro b/include.pro
index c0019b0..c19e2f0 100644
--- a/include.pro
+++ b/include.pro
@@ -17,103 +17,103 @@ contains( CONFIG, quick-app-lib ) {
}
contains ( CONFIG, quick-app-bin ) {
TEMPLATE = app
DESTDIR = $(OPIEDIR)/bin
DEFINES -= OPIE_APP_INTERFACE
message( Touching plugins/application/lib$${TARGET}.so.0 )
system( touch $$(OPIEDIR)/plugins/application/lib$${TARGET}.so.0 )
}
contains( TEMPLATE, lib ) {
target.path = $$prefix/lib
}
!contains( TEMPLATE, lib ) {
target.path = $$prefix/bin
}
INSTALLS += target
# ipkg control files
control.path = /CONTROL
control.files = control postinst prerm postrm preinst conffiles
INSTALLS += control
# images, default is $$prefix/pics/$$TARGET
pics.path = $$prefix/pics/$$TARGET
pics.files = pics/*
INSTALLS += pics
# sounds, default path is $$prefix/sounds/$$TARGET
sounds.path = $$prefix/sounds/$$TARGET
sounds.files = sounds/*
INSTALLS += sounds
# init scripts, default path is /etc/init.d
init.path = /etc/init.d
init.files = init.d/*
INSTALLS += init
# data, default path is /usr/share/$$TARGET
data.path = /usr/share/$$TARGET
data.files = share/*
INSTALLS += data
etc.path = $$prefix/etc/
etc.files = etc/*
INSTALLS += etc
apps.path = $$prefix/apps/
apps.files = apps/*
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
opie-lupdate.target = opie-lupdate
opie-lupdate.commands = opie-lupdate $(PRO)
opie-lrelease.target = opie-lrelease
opie-lrelease.commands = opie-lrelease $(PRO)
lupdate.target = lupdate
lupdate.commands = lupdate -noobsolete $(PRO)
lrelease.target = lrelease
lrelease.commands = lrelease $(PRO)
# new message target to get all strings from the apps with and without tr
messages.target = messages
messages.commands = xgettext -C -n -ktr -kQT_TRANSLATE_NOOP $$HEADERS $$SOURCES -o '$(OPIEDIR)/messages-$(QMAKE_TARGET)-tr.po' && xgettext -C -n -a $$HEADERS $$SOURCES -o '$(OPIEDIR)/messages-$(QMAKE_TARGET)-allstrings.po'
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 opie-lupdate opie-lrelease messages
CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX )
contains( CONFTEST, y ){
QMAKE_LFLAGS += -Wl
LIBS -= -ldl
LIBS -= -lcrypt
LIBS -= -lm
}
else {
QMAKE_LFLAGS += -Wl,-rpath=$$prefix/lib
# I am not sure whether it is a good idea to change the way plugins is build
# on linux. Therefore I remove the "plugin" term, which is needed by MacOS-X
CONFIG -= plugin
}
-QMAKE_LIBDIR += $(OPIEDIR)/lib
+LIBS += -L$(OPIEDIR)/lib
MOC_DIR=.moc/$(PLATFORM)
OBJECTS_DIR=.obj/$(PLATFORM)
#was here now at thetop
#include ( $(OPIEDIR)/gen.pro )
diff --git a/libopie2/opiepim/opiepim.pro b/libopie2/opiepim/opiepim.pro
index b341819..c328315 100644
--- a/libopie2/opiepim/opiepim.pro
+++ b/libopie2/opiepim/opiepim.pro
@@ -1,27 +1,30 @@
TEMPLATE = lib
CONFIG += qt warn_on debug
DESTDIR = $(OPIEDIR)/lib
HEADERS = opimcontact.h opimcontactfields.h opimrecord.h opimtodo.h opimnotify.h \
opimnotifymanager.h opimevent.h
SOURCES = opimcontact.cpp opimcontactfields.cpp opimrecord.cpp opimtodo.cpp opimnotify.cpp \
opimnotifymanager.cpp opimevent.cpp
INTERFACES =
TARGET = opiepim2
-VERSION = 1.8.3
+VERSION = 1.8.4
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lopiecore2 -lopiedb2
+LIBS += -lopiecore2
include ( core/core.pro )
include ( core/backends/backends.pro )
include ( ui/ui.pro )
+contains( ENABLE_SQL_PIM_BACKEND, y )
+ LIBS += -lopiedb2
+
!contains( platform, x11 ) {
include ( $(OPIEDIR)/include.pro )
}
contains( platform, x11 ) {
LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
}