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

Commit

Permalink
Extract libostfile from libprotogui
Browse files Browse the repository at this point in the history
All .pro file changes only

libostfile still has GUI dependency due to PCAP import options UI.
Need to see if we can remove that - maybe extract into a separate
libostfilegui.
  • Loading branch information
pstavirs committed Nov 16, 2023
1 parent f535066 commit c285e91
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 165 deletions.
9 changes: 6 additions & 3 deletions client/ostinato.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,27 @@ INCLUDEPATH += "../rpc/" "../common/"
win32 {
QMAKE_LFLAGS += -static
CONFIG(debug, debug|release) {
LIBS += -L"../common/debug" -lostprotogui -lostproto
LIBS += -L"../common/debug" -lostfile -lostprotogui -lostproto
LIBS += -L"../rpc/debug" -lpbrpc
POST_TARGETDEPS += \
"../common/debug/libostfile.a" \
"../common/debug/libostprotogui.a" \
"../common/debug/libostproto.a" \
"../rpc/debug/libpbrpc.a"
} else {
LIBS += -L"../common/release" -lostprotogui -lostproto
LIBS += -L"../common/release" -lostfile -lostprotogui -lostproto
LIBS += -L"../rpc/release" -lpbrpc
POST_TARGETDEPS += \
"../common/release/libostfile.a" \
"../common/release/libostprotogui.a" \
"../common/release/libostproto.a" \
"../rpc/release/libpbrpc.a"
}
} else {
LIBS += -L"../common" -lostprotogui -lostproto
LIBS += -L"../common" -lostfile -lostprotogui -lostproto
LIBS += -L"../rpc" -lpbrpc
POST_TARGETDEPS += \
"../common/libostfile.a" \
"../common/libostprotogui.a" \
"../common/libostproto.a" \
"../rpc/libpbrpc.a"
Expand Down
96 changes: 1 addition & 95 deletions common/ostfile.pro
Original file line number Diff line number Diff line change
@@ -1,45 +1,17 @@
TEMPLATE = lib
CONFIG += qt staticlib
QT += widgets network xml script
INCLUDEPATH += "../extra/qhexedit2/src"
LIBS += \
-lprotobuf

FORMS = \
pcapfileimport.ui \

FORMS += \
mac.ui \
vlan.ui \
eth2.ui \
dot3.ui \
llc.ui \
snap.ui \
stp.ui \
arp.ui \
ip4.ui \
ip6.ui \
gmp.ui \
gre.ui \
icmp.ui \
tcp.ui \
udp.ui \
textproto.ui \
tosdscp.ui \
hexdump.ui \
payload.ui \
sample.ui \
sign.ui \
userscript.ui

PROTOS = \
fileformat.proto

# TODO: Move fileformat related stuff into a different library - why?
HEADERS = \
ostprotolib.h \
ipv4addressdelegate.h \
ipv6addressdelegate.h \
nativefileformat.h \
ossnfileformat.h \
ostmfileformat.h \
Expand All @@ -50,44 +22,7 @@ HEADERS = \
pdmlprotocols.h \
pdmlreader.h \
sessionfileformat.h \
streamfileformat.h \
spinboxdelegate.h

HEADERS += \
tosdscp.h

HEADERS += \
abstractprotocolconfig.h \
comboprotocolconfig.h \
protocolwidgetfactory.h \
macconfig.h \
vlanconfig.h \
svlanconfig.h \
vlanstackconfig.h \
eth2config.h \
dot3config.h \
llcconfig.h \
dot2llcconfig.h \
snapconfig.h \
dot2snapconfig.h \
stpconfig.h \
arpconfig.h \
ip4config.h \
ip6config.h \
ip4over4config.h \
gmpconfig.h \
greconfig.h \
icmpconfig.h \
igmpconfig.h \
mldconfig.h \
tcpconfig.h \
udpconfig.h \
textprotoconfig.h \
hexdumpconfig.h \
payloadconfig.h \
sampleconfig.h \
signconfig.h \
userscriptconfig.h
streamfileformat.h

SOURCES += \
ostprotolib.cpp \
Expand All @@ -104,35 +39,6 @@ SOURCES += \
streamfileformat.cpp \
spinboxdelegate.cpp

SOURCES += \
tosdscp.cpp

SOURCES += \
protocolwidgetfactory.cpp \
macconfig.cpp \
vlanconfig.cpp \
eth2config.cpp \
dot3config.cpp \
llcconfig.cpp \
snapconfig.cpp \
stpconfig.cpp \
arpconfig.cpp \
ip4config.cpp \
ip6config.cpp \
gmpconfig.cpp \
greconfig.cpp \
icmpconfig.cpp \
igmpconfig.cpp \
mldconfig.cpp \
tcpconfig.cpp \
udpconfig.cpp \
textprotoconfig.cpp \
hexdumpconfig.cpp \
payloadconfig.cpp \
sampleconfig.cpp \
signconfig.cpp \
userscriptconfig.cpp

SOURCES += \
vlanpdml.cpp \
svlanpdml.cpp \
Expand Down
60 changes: 1 addition & 59 deletions common/ostprotogui.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ TEMPLATE = lib
CONFIG += qt staticlib
QT += widgets network xml script
INCLUDEPATH += "../extra/qhexedit2/src"
LIBS += \
-lprotobuf

FORMS = \
pcapfileimport.ui \

FORMS += \
mac.ui \
Expand All @@ -32,28 +27,10 @@ FORMS += \
sign.ui \
userscript.ui

PROTOS = \
fileformat.proto

# TODO: Move fileformat related stuff into a different library - why?
HEADERS = \
ostprotolib.h \
ipv4addressdelegate.h \
ipv6addressdelegate.h \
nativefileformat.h \
ossnfileformat.h \
ostmfileformat.h \
pcapfileformat.h \
pdmlfileformat.h \
pythonfileformat.h \
pdmlprotocol.h \
pdmlprotocols.h \
pdmlreader.h \
sessionfileformat.h \
streamfileformat.h \
spinboxdelegate.h

HEADERS += \
spinboxdelegate.h \
tosdscp.h

HEADERS += \
Expand Down Expand Up @@ -89,21 +66,6 @@ HEADERS += \
signconfig.h \
userscriptconfig.h

SOURCES += \
ostprotolib.cpp \
nativefileformat.cpp \
ossnfileformat.cpp \
ostmfileformat.cpp \
pcapfileformat.cpp \
pdmlfileformat.cpp \
pythonfileformat.cpp \
pdmlprotocol.cpp \
pdmlprotocols.cpp \
pdmlreader.cpp \
sessionfileformat.cpp \
streamfileformat.cpp \
spinboxdelegate.cpp

SOURCES += \
tosdscp.cpp

Expand Down Expand Up @@ -133,26 +95,6 @@ SOURCES += \
signconfig.cpp \
userscriptconfig.cpp

SOURCES += \
vlanpdml.cpp \
svlanpdml.cpp \
stppdml.cpp \
eth2pdml.cpp \
llcpdml.cpp \
arppdml.cpp \
ip4pdml.cpp \
ip6pdml.cpp \
grepdml.cpp \
icmppdml.cpp \
icmp6pdml.cpp \
igmppdml.cpp \
mldpdml.cpp \
tcppdml.cpp \
udppdml.cpp \
textprotopdml.cpp \
samplepdml.cpp

QMAKE_DISTCLEAN += object_script.*

include(../protobuf.pri)
include(../options.pri)
7 changes: 5 additions & 2 deletions ost.pro
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
TEMPLATE = subdirs
SUBDIRS = client server ostproto ostprotogui rpc extra
SUBDIRS = client server ostfile ostproto ostprotogui rpc extra

client.target = client
client.file = client/ostinato.pro
client.depends = ostproto ostprotogui rpc extra
client.depends = ostfile ostproto ostprotogui rpc extra

server.target = server
server.file = server/drone.pro
server.depends = ostproto rpc

ostfile.file = common/ostfile.pro
ostfile.depends = ostproto

ostproto.file = common/ostproto.pro

ostprotogui.file = common/ostprotogui.pro
Expand Down
12 changes: 6 additions & 6 deletions test/test.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ INCLUDEPATH += "../rpc/" "../common/" "../client"
win32 {
LIBS += -lwpcap -lpacket
CONFIG(debug, debug|release) {
LIBS += -L"../common/debug" -lostprotogui -lostproto
LIBS += -L"../common/debug" -lostfile -lostproto
LIBS += -L"../rpc/debug" -lpbrpc
POST_TARGETDEPS += \
"../common/debug/libostprotogui.a" \
"../common/debug/libostfile.a" \
"../common/debug/libostproto.a" \
"../rpc/debug/libpbrpc.a"
} else {
LIBS += -L"../common/release" -lostprotogui -lostproto
LIBS += -L"../common/release" -lostfile -lostproto
LIBS += -L"../rpc/release" -lpbrpc
POST_TARGETDEPS += \
"../common/release/libostprotogui.a" \
"../common/release/libostfile.a" \
"../common/release/libostproto.a" \
"../rpc/release/libpbrpc.a"
}
} else {
LIBS += -lpcap
LIBS += -L"../common" -lostprotogui -lostproto
LIBS += -L"../common" -lostfile -lostproto
LIBS += -L"../rpc" -lpbrpc
POST_TARGETDEPS += \
"../common/libostprotogui.a" \
"../common/libostfile.a" \
"../common/libostproto.a" \
"../rpc/libpbrpc.a"
}
Expand Down

0 comments on commit c285e91

Please sign in to comment.