Replaced top-level Makefile with a qmake .pro so the top-level Makefile is also generated now; having a top-level .pro makes it easier for folks who use Qt Creator. Also 'make install' is now supported - a custom install path prefix can be provided, if required, by passing PREFIX=/absolute/path/prefix to qmake
This commit is contained in:
parent
4cba17e6c8
commit
4d83432a5d
@ -11,7 +11,7 @@ moc_*.cpp
|
||||
qrc_*.cpp
|
||||
|
||||
# QMake generated files
|
||||
*\Makefile*
|
||||
Makefile*
|
||||
*\object_script.*
|
||||
|
||||
# protobuf generated files
|
||||
|
30
Makefile
30
Makefile
@ -1,30 +0,0 @@
|
||||
debug: QMAKE_CONFIG=-config debug
|
||||
release: QMAKE_CONFIG=-config release
|
||||
|
||||
all:
|
||||
$(MAKE) -C rpc
|
||||
$(MAKE) -C common
|
||||
$(MAKE) -C server
|
||||
$(MAKE) -C client
|
||||
|
||||
release: qmake all
|
||||
debug: qmake all
|
||||
|
||||
clean:
|
||||
-$(MAKE) -C client $@
|
||||
-$(MAKE) -C server $@
|
||||
-$(MAKE) -C common $@
|
||||
-$(MAKE) -C rpc $@
|
||||
|
||||
distclean:
|
||||
-$(MAKE) -C client $@
|
||||
-$(MAKE) -C server $@
|
||||
-$(MAKE) -C common $@
|
||||
-$(MAKE) -C rpc $@
|
||||
|
||||
qmake:
|
||||
cd rpc && qmake $(QMAKE_CONFIG) && cd ..
|
||||
cd common && qmake $(QMAKE_CONFIG) && cd ..
|
||||
cd server && qmake $(QMAKE_CONFIG) && cd ..
|
||||
cd client && qmake $(QMAKE_CONFIG) && cd ..
|
||||
|
@ -75,6 +75,7 @@ SOURCES += \
|
||||
|
||||
QMAKE_DISTCLEAN += object_script.*
|
||||
|
||||
include(../install.pri)
|
||||
include(../version.pri)
|
||||
|
||||
# TODO(LOW): Test only
|
||||
|
9
install.pri
Normal file
9
install.pri
Normal file
@ -0,0 +1,9 @@
|
||||
# A custom install path prefix can be provided by passing PREFIX=/absolute/path
|
||||
# to qmake; if one is not provided, we use the below defaults -
|
||||
isEmpty(PREFIX) {
|
||||
unix:PREFIX = "/usr/local/"
|
||||
win32:PREFIX = "../"
|
||||
}
|
||||
target.path = $$PREFIX/bin
|
||||
|
||||
INSTALLS += target
|
7
ost.pro
Normal file
7
ost.pro
Normal file
@ -0,0 +1,7 @@
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
SUBDIRS = \
|
||||
rpc/pbrpc.pro \
|
||||
common/ostproto.pro \
|
||||
server/drone.pro \
|
||||
client/ostinato.pro
|
@ -40,4 +40,5 @@ SOURCES += pcapextra.cpp
|
||||
|
||||
QMAKE_DISTCLEAN += object_script.*
|
||||
|
||||
include (../install.pri)
|
||||
include (../version.pri)
|
||||
|
Loading…
Reference in New Issue
Block a user