1 | isEmpty(DEPTH):error("DEPTH is not set before including common.pri!")
|
---|
2 |
|
---|
3 | DESTDIR = .
|
---|
4 |
|
---|
5 | !build_pass: {
|
---|
6 | debug_and_release {
|
---|
7 | debug-run.target = debug-run
|
---|
8 | debug-run.commands = $(MAKE) -f $(MAKEFILE).Debug run
|
---|
9 | release-run.target = release-run
|
---|
10 | release-run.commands = $(MAKE) -f $(MAKEFILE).Release run
|
---|
11 | QMAKE_EXTRA_TARGETS += debug-run release-run
|
---|
12 |
|
---|
13 | debug-dbg.target = debug-dbg
|
---|
14 | debug-dbg.commands = $(MAKE) -f $(MAKEFILE).Debug dbg
|
---|
15 | release-dbg.target = release-dbg
|
---|
16 | release-dbg.commands = $(MAKE) -f $(MAKEFILE).Release dbg
|
---|
17 | QMAKE_EXTRA_TARGETS += debug-dbg release-dbg
|
---|
18 | }
|
---|
19 | } else {
|
---|
20 | isEmpty(RUN_SHELL):RUN_SHELL = $(RUN_SHELL)
|
---|
21 | isEmpty(RUN_ARGS):RUN_ARGS = $(RUN_ARGS)
|
---|
22 |
|
---|
23 | run.target = run
|
---|
24 | run.commands = $$RUN_SHELL $(DESTDIR_TARGET) $$RUN_ARGS
|
---|
25 | run.depends = $(DESTDIR_TARGET)
|
---|
26 | QMAKE_EXTRA_TARGETS += run
|
---|
27 |
|
---|
28 | os2:isEmpty(RUN_DEBUG):RUN_DEBUG = idbug
|
---|
29 | win:isEmpty(RUN_DEBUG):RUN_DEBUG = windbg
|
---|
30 | unix:isEmpty(RUN_DEBUG):RUN_DEBUG = gdb
|
---|
31 |
|
---|
32 | dbg.target = dbg
|
---|
33 | dbg.commands = $$RUN_SHELL $$RUN_DEBUG $(DESTDIR_TARGET) $$RUN_ARGS
|
---|
34 | dbg.depends = $(DESTDIR_TARGET)
|
---|
35 | QMAKE_EXTRA_TARGETS += dbg
|
---|
36 | }
|
---|
37 |
|
---|
38 | # All kinds of builds should have the console if possible
|
---|
39 | win32 {
|
---|
40 | CONFIG(release, debug|release):CONFIG(qt):contains(QT, gui) {
|
---|
41 | CONFIG -= console
|
---|
42 | CONFIG *= windows
|
---|
43 | } else {
|
---|
44 | CONFIG -= windows
|
---|
45 | CONFIG *= console
|
---|
46 | }
|
---|
47 | }
|
---|
48 | os2 {
|
---|
49 | CONFIG -= windows
|
---|
50 | CONFIG *= console
|
---|
51 | }
|
---|
52 |
|
---|
53 | defineReplace(fixSep) {
|
---|
54 | win32|os2 {
|
---|
55 | 1 = $$replace(1,/,\\)
|
---|
56 | }
|
---|
57 | return($$1)
|
---|
58 | }
|
---|
59 |
|
---|
60 | defineReplace(file_copier_output_path) {
|
---|
61 | isEmpty(FILES.path):FILES.path = $$DESTDIR
|
---|
62 | 1 = $${FILES.path}/$$basename(1)
|
---|
63 | return($$1)
|
---|
64 | }
|
---|
65 |
|
---|
66 | file_copier.input = FILES
|
---|
67 | file_copier.output = ${QMAKE_FUNC_file_copier_output_path}
|
---|
68 | file_copier.commands = $(COPY_FILE) ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
|
---|
69 | file_copier.CONFIG += no_link
|
---|
70 | file_copier.variable_out = POST_TARGETDEPS
|
---|
71 | QMAKE_EXTRA_COMPILERS += file_copier
|
---|