Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Commit

Permalink
Simplify .pro file by removing some duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
pstavirs committed Nov 16, 2023
1 parent 23ee0e6 commit 469e0b0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 59 deletions.
42 changes: 14 additions & 28 deletions client/ostinato.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,26 @@ win32:RC_FILE = ostinato.rc
macx:ICON = icons/logo.icns
QT += widgets network script xml svg
INCLUDEPATH += "../rpc/" "../common/"

OBJDIR = .
win32 {
QMAKE_LFLAGS += -static
CONFIG(debug, debug|release) {
LIBS += -L"../common/debug" -lostfilegui -lostfile
LIBS += -L"../common/debug" -lostprotogui -lostproto
LIBS += -L"../rpc/debug" -lpbrpc
POST_TARGETDEPS += \
"../common/debug/libostfilegui.a" \
"../common/debug/libostfile.a" \
"../common/debug/libostprotogui.a" \
"../common/debug/libostproto.a" \
"../rpc/debug/libpbrpc.a"
OBJDIR = debug
} else {
LIBS += -L"../common/release" -lostfilegui -lostfile
LIBS += -L"../common/release" -lostprotogui -lostproto
LIBS += -L"../rpc/release" -lpbrpc
POST_TARGETDEPS += \
"../common/release/libostfilegui.a" \
"../common/release/libostfile.a" \
"../common/release/libostprotogui.a" \
"../common/release/libostproto.a" \
"../rpc/release/libpbrpc.a"
OBJDIR = release
}
} else {
LIBS += -L"../common" -lostfile -lostfilegui
LIBS += -L"../common" -lostprotogui -lostproto
LIBS += -L"../rpc" -lpbrpc
POST_TARGETDEPS += \
"../common/libostfilegui.a" \
"../common/libostfile.a" \
"../common/libostprotogui.a" \
"../common/libostproto.a" \
"../rpc/libpbrpc.a"
}
LIBS += -L"../common/$$OBJDIR" -lostfile -lostfilegui
LIBS += -L"../common/$$OBJDIR" -lostprotogui -lostproto
LIBS += -L"../rpc/$$OBJDIR" -lpbrpc
POST_TARGETDEPS += \
"../common/$$OBJDIR/libostfilegui.a" \
"../common/$$OBJDIR/libostfile.a" \
"../common/$$OBJDIR/libostprotogui.a" \
"../common/$$OBJDIR/libostproto.a" \
"../rpc/$$OBJDIR/libpbrpc.a"

LIBS += -lprotobuf
LIBS += -L"../extra/qhexedit2/$(OBJECTS_DIR)/" -lqhexedit2
RESOURCES += ostinato.qrc
Expand Down
23 changes: 10 additions & 13 deletions server/drone.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ linux*:system(grep -q IFLA_STATS64 /usr/include/linux/if_link.h): \
DEFINES += HAVE_IFLA_STATS64
INCLUDEPATH += "../common"
INCLUDEPATH += "../rpc"

OBJDIR = .
win32 {
# Support Windows Vista and above only
DEFINES += WIN32_LEAN_AND_MEAN NTDDI_VERSION=0x06000000 _WIN32_WINNT=0x0600
Expand All @@ -15,24 +17,19 @@ win32 {
QMAKE_LFLAGS += -static
LIBS += -lwpcap -lpacket -liphlpapi
CONFIG(debug, debug|release) {
LIBS += -L"../common/debug" -lostproto
LIBS += -L"../rpc/debug" -lpbrpc
POST_TARGETDEPS += \
"../common/debug/libostproto.a" \
"../rpc/debug/libpbrpc.a"
OBJDIR = debug
} else {
LIBS += -L"../common/release" -lostproto
LIBS += -L"../rpc/release" -lpbrpc
POST_TARGETDEPS += \
"../common/release/libostproto.a" \
"../rpc/release/libpbrpc.a"
OBJDIR = release
}
} else {
LIBS += -lpcap
LIBS += -L"../common" -lostproto
LIBS += -L"../rpc" -lpbrpc
POST_TARGETDEPS += "../common/libostproto.a" "../rpc/libpbrpc.a"
}
LIBS += -L"../common/$$OBJDIR" -lostproto
LIBS += -L"../rpc/$$OBJDIR" -lpbrpc
POST_TARGETDEPS += \
"../common/$$OBJDIR//libostproto.a" \
"../rpc/$$OBJDIR/libpbrpc.a"

linux {
INCLUDEPATH += "/usr/include/libnl3"
LIBS += -lnl-3 -lnl-route-3
Expand Down
29 changes: 11 additions & 18 deletions test/test.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,25 @@ TEMPLATE = app
CONFIG += qt console
QT += xml network script
INCLUDEPATH += "../rpc/" "../common/" "../client"

OBJDIR = .
win32 {
LIBS += -lwpcap -lpacket
CONFIG(debug, debug|release) {
LIBS += -L"../common/debug" -lostfile -lostproto
LIBS += -L"../rpc/debug" -lpbrpc
POST_TARGETDEPS += \
"../common/debug/libostfile.a" \
"../common/debug/libostproto.a" \
"../rpc/debug/libpbrpc.a"
OBJDIR = debug
} else {
LIBS += -L"../common/release" -lostfile -lostproto
LIBS += -L"../rpc/release" -lpbrpc
POST_TARGETDEPS += \
"../common/release/libostfile.a" \
"../common/release/libostproto.a" \
"../rpc/release/libpbrpc.a"
OBJDIR = release
}
} else {
LIBS += -lpcap
LIBS += -L"../common" -lostfile -lostproto
LIBS += -L"../rpc" -lpbrpc
POST_TARGETDEPS += \
"../common/libostfile.a" \
"../common/libostproto.a" \
"../rpc/libpbrpc.a"
}
LIBS += -L"../common/$$OBJDIR" -lostfile -lostproto
LIBS += -L"../rpc/$$OBJDIR" -lpbrpc
POST_TARGETDEPS += \
"../common/$$OBJDIR/libostfile.a" \
"../common/$$OBJDIR/libostproto.a" \
"../rpc/$$OBJDIR/libpbrpc.a"

LIBS += -lprotobuf
LIBS += -L"../extra/qhexedit2/$(OBJECTS_DIR)/" -lqhexedit2

Expand Down

0 comments on commit 469e0b0

Please sign in to comment.