forked from epsilonrt/mbpoll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mbpoll.pro
75 lines (59 loc) · 1.49 KB
/
mbpoll.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
TARGET = mbpoll
TEMPLATE = app
CONFIG += console
QT -= core gui
OBJECTS_DIR = obj
SOURCES += src/mbpoll.c \
3rdparty/modbus/modbus.c \
3rdparty/modbus/modbus-data.c \
3rdparty/modbus/modbus-tcp.c \
3rdparty/modbus/modbus-rtu.c
HEADERS += src/config.h \
3rdparty/modbus/modbus.h \
INCLUDEPATH += 3rdparty 3rdparty/modbus
distclean_dirs = $$OBJECTS_DIR/
unix {
DEFINES += _TTY_POSIX_
QMAKE_CFLAGS += -Wno-unused-parameter -Wno-unused-function
INSTALLBASE = /usr/local
INSTALLBIN = $$INSTALLBASE/bin
QMAKE_DEL_FILE = rm -fr
CONFIG(chipio) {
DEFINES += USE_CHIPIO
LIBS += -lsysio
} else {
CONFIG(sysio) {
LIBS += -lsysio
} else {
SOURCES += 3rdparty/sysio/delay.c \
3rdparty/sysio/serial.c
}
}
}
win32 {
SOURCES += 3rdparty/getopt/getopt.c
SOURCES += 3rdparty/sysio/delay.c \
3rdparty/sysio/serial.c
INCLUDEPATH += 3rdparty/getopt
DEFINES += _TTY_WIN_ WINVER=0x0501 STATIC_GETOPT
DEFINES += _WINSOCK_DEPRECATED_NO_WARNINGS
DEFINES += _CRT_SECURE_NO_WARNINGS
LIBS += -lsetupapi -lwsock32 -lws2_32
INSTALLBASE = package/win/app
INSTALLBIN = $$INSTALLBASE
distclean_dirs ~= s,/,\\,g
QMAKE_DEL_FILE = DEL /S /Q
}
QMAKE_DISTCLEAN += $$distclean_dirs
CONFIG(debug, debug|release) {
DEFINES += DEBUG
}
target.path = $$INSTALLBIN
INSTALLS += target
unix {
CONFIG(chipio) {
setuid.extra = chmod u+s $$INSTALLBIN/$$TARGET
setuid.path = $$INSTALLBIN
INSTALLS += setuid
}
}