[205] | 1 | isEmpty(DEPTH):DEPTH = .
|
---|
| 2 |
|
---|
[209] | 3 | os2:PLATFORM = os2
|
---|
| 4 | else:win32:PLATFORM = win
|
---|
| 5 | else:x11:PLATFORM = x11
|
---|
[303] | 6 | else:PLATFORM = unknown
|
---|
[209] | 7 |
|
---|
| 8 | # in debug_and_release, we need a -debug or -release suffix to get separate
|
---|
| 9 | # output paths (it will be replaced with the correct one at runtime)
|
---|
| 10 | debug_and_release:OUTPATH_SUFFIX = -debug
|
---|
| 11 | else:OUTPATH_SUFFIX =
|
---|
| 12 |
|
---|
| 13 | OBJECTS_DIR = $$DEPTH/obj/$${PLATFORM}$${OUTPATH_SUFFIX}
|
---|
[205] | 14 | MOC_DIR = $$OBJECTS_DIR
|
---|
| 15 | DESTDIR = $$OBJECTS_DIR
|
---|
| 16 |
|
---|
[209] | 17 | # target.path isn't there by default
|
---|
[205] | 18 | QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR target.path
|
---|
| 19 |
|
---|
[209] | 20 | target.path = $$DEPTH/bin/$${PLATFORM}$${OUTPATH_SUFFIX}
|
---|
[205] | 21 | INSTALLS += target
|
---|
[303] | 22 |
|
---|
[610] | 23 | !build_pass: {
|
---|
| 24 | debug_and_release {
|
---|
| 25 | debug-run.target = debug-run
|
---|
| 26 | debug-run.commands = $(MAKE) -f $(MAKEFILE).Debug run
|
---|
| 27 | release-run.target = release-run
|
---|
| 28 | release-run.commands = $(MAKE) -f $(MAKEFILE).Release run
|
---|
| 29 | QMAKE_EXTRA_TARGETS += debug-run release-run
|
---|
| 30 |
|
---|
| 31 | debug-dbg.target = debug-dbg
|
---|
| 32 | debug-dbg.commands = $(MAKE) -f $(MAKEFILE).Debug dbg
|
---|
| 33 | release-dbg.target = release-dbg
|
---|
| 34 | release-dbg.commands = $(MAKE) -f $(MAKEFILE).Release dbg
|
---|
| 35 | QMAKE_EXTRA_TARGETS += debug-dbg release-dbg
|
---|
| 36 | }
|
---|
[303] | 37 | } else {
|
---|
[328] | 38 | isEmpty(RUN_SHELL):RUN_SHELL = $(RUN_SHELL)
|
---|
| 39 | isEmpty(RUN_ARGS):RUN_ARGS = $(RUN_ARGS)
|
---|
[610] | 40 |
|
---|
[303] | 41 | run.target = run
|
---|
[328] | 42 | run.commands = $$RUN_SHELL $(DESTDIR_TARGET) $$RUN_ARGS
|
---|
[303] | 43 | run.depends = $(DESTDIR_TARGET)
|
---|
| 44 | QMAKE_EXTRA_TARGETS += run
|
---|
[610] | 45 |
|
---|
| 46 | os2:isEmpty(RUN_DEBUG):RUN_DEBUG = idbug
|
---|
| 47 | win:isEmpty(RUN_DEBUG):RUN_DEBUG = windbg
|
---|
| 48 | unix:isEmpty(RUN_DEBUG):RUN_DEBUG = gdb
|
---|
| 49 |
|
---|
| 50 | dbg.target = dbg
|
---|
| 51 | dbg.commands = $$RUN_SHELL $$RUN_DEBUG $(DESTDIR_TARGET) $$RUN_ARGS
|
---|
| 52 | dbg.depends = $(DESTDIR_TARGET)
|
---|
| 53 | QMAKE_EXTRA_TARGETS += dbg
|
---|
[303] | 54 | }
|
---|
| 55 |
|
---|
| 56 | win32 {
|
---|
| 57 | CONFIG(release, debug|release):CONFIG(qt):contains(QT, gui) {
|
---|
| 58 | CONFIG -= console
|
---|
| 59 | CONFIG *= windows
|
---|
| 60 | } else {
|
---|
| 61 | CONFIG -= windows
|
---|
| 62 | CONFIG *= console
|
---|
| 63 | }
|
---|
| 64 | }
|
---|