author | mickeyl <mickeyl> | 2004-03-26 17:36:46 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-03-26 17:36:46 (UTC) |
commit | 5df13d7b2acd41c54bed6253afac827bc864ea5a (patch) (side-by-side diff) | |
tree | 8c3672a0be7f09094c0ec6658f98fd762108c17f | |
parent | 5d2442fc6e0fb992b9fe3998cc7b9ee6dffb8e2b (diff) | |
download | opie-5df13d7b2acd41c54bed6253afac827bc864ea5a.zip opie-5df13d7b2acd41c54bed6253afac827bc864ea5a.tar.gz opie-5df13d7b2acd41c54bed6253afac827bc864ea5a.tar.bz2 |
conditionally link against -lopiedb, i.e. only when ENABLE_SQL_PIM_BACKEND=y
-rw-r--r-- | Rules.make | 7 | ||||
-rw-r--r-- | include.pro | 2 | ||||
-rw-r--r-- | libopie2/opiepim/opiepim.pro | 7 |
3 files changed, 12 insertions, 4 deletions
@@ -1,80 +1,85 @@ .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 : diff --git a/include.pro b/include.pro index c0019b0..c19e2f0 100644 --- a/include.pro +++ b/include.pro @@ -65,55 +65,55 @@ 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 } |