| 1 |
include( $(OPIEDIR)/gen.pro ) |
| 2 |
|
| 3 |
# base opie install path |
| 4 |
# prefix = /opt/QtPalmtop ??? Why here (eilers) ??? |
| 5 |
prefix = $(OPIEDIR) |
| 6 |
|
| 7 |
contains( CONFIG, quick-app-lib ) { |
| 8 |
TEMPLATE = lib |
| 9 |
CONFIG += plugin # "plugin" will be removed automatically later if not MacOSX ! (eilers) |
| 10 |
DESTDIR = $(OPIEDIR)/plugins/application |
| 11 |
DEFINES += OPIE_APP_INTERFACE |
| 12 |
DEFINES += QUICKAPP_NAME="\"$${TARGET}\"" |
| 13 |
|
| 14 |
!contains( TARGET, launcher ) { |
| 15 |
message( Linking $$TARGET to quicklauncher ) |
| 16 |
system( rm -f $$(OPIEDIR)/bin/$$TARGET ) |
| 17 |
system( ln -sf $$QUICKLAUNCH_PATH $$(OPIEDIR)/bin/$$TARGET ) |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
contains ( CONFIG, quick-app-bin ) { |
| 22 |
TEMPLATE = app |
| 23 |
DESTDIR = $(OPIEDIR)/bin |
| 24 |
DEFINES -= OPIE_APP_INTERFACE |
| 25 |
DEFINES += QUICKAPP_NAME="\"$${TARGET}\"" |
| 26 |
message( Touching plugins/application/lib$${TARGET}.so.0 ) |
| 27 |
system( touch $$(OPIEDIR)/plugins/application/lib$${TARGET}.so.0 ) |
| 28 |
} |
| 29 |
|
| 30 |
|
| 31 |
contains( TEMPLATE, lib ) { |
| 32 |
target.path = $$prefix/lib |
| 33 |
} |
| 34 |
!contains( TEMPLATE, lib ) { |
| 35 |
target.path = $$prefix/bin |
| 36 |
} |
| 37 |
INSTALLS += target |
| 38 |
|
| 39 |
# ipkg control files |
| 40 |
control.path = /CONTROL |
| 41 |
control.files = control postinst prerm postrm preinst conffiles |
| 42 |
INSTALLS += control |
| 43 |
|
| 44 |
# images, default is $$prefix/pics/$$TARGET |
| 45 |
pics.path = $$prefix/pics/$$TARGET |
| 46 |
pics.files = pics/* |
| 47 |
INSTALLS += pics |
| 48 |
|
| 49 |
# sounds, default path is $$prefix/sounds/$$TARGET |
| 50 |
sounds.path = $$prefix/sounds/$$TARGET |
| 51 |
sounds.files = sounds/* |
| 52 |
INSTALLS += sounds |
| 53 |
|
| 54 |
# init scripts, default path is /etc/init.d |
| 55 |
init.path = /etc/init.d |
| 56 |
init.files = init.d/* |
| 57 |
INSTALLS += init |
| 58 |
|
| 59 |
# data, default path is /usr/share/$$TARGET |
| 60 |
data.path = /usr/share/$$TARGET |
| 61 |
data.files = share/* |
| 62 |
INSTALLS += data |
| 63 |
|
| 64 |
etc.path = $$prefix/etc/ |
| 65 |
etc.files = etc/* |
| 66 |
INSTALLS += etc |
| 67 |
|
| 68 |
apps.path = $$prefix/apps/ |
| 69 |
apps.files = apps/* |
| 70 |
INSTALLS += apps |
| 71 |
|
| 72 |
# sounds, default path is $$prefix/sounds/$$TARGET |
| 73 |
sounds.path = $$prefix/sounds/$$TARGET |
| 74 |
sounds.files = sounds/* |
| 75 |
INSTALLS += sounds |
| 76 |
|
| 77 |
# anything in nonstandard paths |
| 78 |
root.path = / |
| 79 |
root.files = root/* |
| 80 |
INSTALLS += root |
| 81 |
|
| 82 |
# new targets |
| 83 |
opie-lupdate.target = opie-lupdate |
| 84 |
opie-lupdate.commands = opie-lupdate $(PRO) |
| 85 |
|
| 86 |
opie-lrelease.target = opie-lrelease |
| 87 |
opie-lrelease.commands = opie-lrelease $(PRO) |
| 88 |
|
| 89 |
lupdate.target = lupdate |
| 90 |
lupdate.commands = lupdate -noobsolete $(PRO) |
| 91 |
|
| 92 |
lrelease.target = lrelease |
| 93 |
lrelease.commands = lrelease $(PRO) |
| 94 |
|
| 95 |
# new message target to get all strings from the apps with and without tr |
| 96 |
messages.target = messages |
| 97 |
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' |
| 98 |
|
| 99 |
ipk.target = ipk |
| 100 |
ipk.commands = tmp=`mktemp -d /tmp/ipkg-opie.XXXXXXXXXX` && ( $(MAKE) INSTALL_ROOT="$$$$tmp" install && ipkg-build $$$$tmp; rm -rf $$$$tmp; ) |
| 101 |
|
| 102 |
QMAKE_EXTRA_UNIX_TARGETS += lupdate lrelease ipk opie-lupdate opie-lrelease messages |
| 103 |
|
| 104 |
CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) |
| 105 |
contains( CONFTEST, y ){ |
| 106 |
QMAKE_LFLAGS += -Wl |
| 107 |
LIBS -= -ldl |
| 108 |
LIBS -= -lcrypt |
| 109 |
LIBS -= -lm |
| 110 |
|
| 111 |
# Manual including indirect referenced libraries which are not loaded |
| 112 |
# by the mac-linker automatically |
| 113 |
# IF YOU COMPILE FOR THE FIRST TIME, COMMENT OUT ONE OF THE FOLLOWING |
| 114 |
# (regarding whether you activate SQL) and the last one (-lopiecore2) |
| 115 |
#CONFTEST = $$system( echo $CONFIG_SQL_PIM_BACKEND ) |
| 116 |
#contains( CONFTEST, y ){ |
| 117 |
# LIBS += -lopiedb2 -lqpe |
| 118 |
#} else { |
| 119 |
# LIBS += -lqpe |
| 120 |
#} |
| 121 |
#LIBS += -lopiecore2 |
| 122 |
} |
| 123 |
else { |
| 124 |
|
| 125 |
QMAKE_LFLAGS += -Wl,-rpath-link,$$prefix/lib |
| 126 |
# I am not sure whether it is a good idea to change the way plugins is build |
| 127 |
# on linux. Therefore I remove the "plugin" term, which is needed by MacOS-X |
| 128 |
CONFIG -= plugin |
| 129 |
} |
| 130 |
LIBS += -L$(OPIEDIR)/lib |
| 131 |
|
| 132 |
MOC_DIR=.moc/$(PLATFORM) |
| 133 |
OBJECTS_DIR=.obj/$(PLATFORM) |
| 134 |
|
| 135 |
#was here now at thetop |
| 136 |
#include( $(OPIEDIR)/gen.pro ) |