Add SKIPQT makefile var

This commit is contained in:
Philippe Teuwen 2019-10-09 19:28:37 +02:00
commit 8b99cd0303
2 changed files with 34 additions and 26 deletions

View file

@ -77,36 +77,37 @@ else
endif endif
endif endif
# Check for correctly configured Qt5 ifneq ($(SKIPQT),1)
QTINCLUDES = $(shell pkg-config --cflags Qt5Core Qt5Widgets 2>/dev/null) # Check for correctly configured Qt5
QTLDLIBS = $(shell pkg-config --libs Qt5Core Qt5Widgets 2>/dev/null) QTINCLUDES = $(shell pkg-config --cflags Qt5Core Qt5Widgets 2>/dev/null)
MOC = $(shell pkg-config --variable=host_bins Qt5Core)/moc QTLDLIBS = $(shell pkg-config --libs Qt5Core Qt5Widgets 2>/dev/null)
UIC = $(shell pkg-config --variable=host_bins Qt5Core)/uic MOC = $(shell pkg-config --variable=host_bins Qt5Core)/moc
ifeq ($(QTINCLUDES), ) UIC = $(shell pkg-config --variable=host_bins Qt5Core)/uic
# if Qt5 not found check for correctly configured Qt4 ifeq ($(QTINCLUDES), )
QTINCLUDES = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) # if Qt5 not found check for correctly configured Qt4
QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null) QTINCLUDES = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null)
MOC = $(shell pkg-config --variable=moc_location QtCore) QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null)
UIC = $(shell pkg-config --variable=uic_location QtCore) MOC = $(shell pkg-config --variable=moc_location QtCore)
else UIC = $(shell pkg-config --variable=uic_location QtCore)
PM3CXXFLAGS += -std=c++11 -fPIC else
endif PM3CXXFLAGS += -std=c++11 -fPIC
ifeq ($(QTINCLUDES), ) endif
# if both pkg-config commands failed, search in common places ifeq ($(QTINCLUDES), )
ifneq ($(QTDIR), ) # if both pkg-config commands failed, search in common places
QTINCLUDES = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui ifneq ($(QTDIR), )
QTLDLIBS = -L$(QTDIR)/lib -lQtCore4 -lQtGui4 QTINCLUDES = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui
ifneq ($(wildcard $(QTDIR)/include/QtWidgets),) QTLDLIBS = -L$(QTDIR)/lib -lQtCore4 -lQtGui4
QTINCLUDES += -I$(QTDIR)/include/QtWidgets ifneq ($(wildcard $(QTDIR)/include/QtWidgets),)
QTLDLIBS = -L$(QTDIR)/lib -lQt5Widgets -lQt5Gui -lQt5Core QTINCLUDES += -I$(QTDIR)/include/QtWidgets
PM3CXXFLAGS += -std=c++11 -fPIC QTLDLIBS = -L$(QTDIR)/lib -lQt5Widgets -lQt5Gui -lQt5Core
PM3CXXFLAGS += -std=c++11 -fPIC
endif
MOC = $(QTDIR)/bin/moc
UIC = $(QTDIR)/bin/uic
endif endif
MOC = $(QTDIR)/bin/moc
UIC = $(QTDIR)/bin/uic
endif endif
endif endif
ifneq ($(QTLDLIBS),) ifneq ($(QTLDLIBS),)
QTGUIOBJS = $(OBJDIR)/proxgui.o $(OBJDIR)/proxguiqt.o $(OBJDIR)/proxguiqt.moc.o QTGUIOBJS = $(OBJDIR)/proxgui.o $(OBJDIR)/proxguiqt.o $(OBJDIR)/proxguiqt.moc.o
PM3CFLAGS += -DHAVE_GUI PM3CFLAGS += -DHAVE_GUI

View file

@ -12,6 +12,13 @@ Via some definitions, you can adjust the firmware for a given platform, but also
The client doesn't depend on the capabilities of the Proxmark3 it's connected to. The client doesn't depend on the capabilities of the Proxmark3 it's connected to.
So you can use the same client for different Proxmark3 platforms, given that everything is running the same version. So you can use the same client for different Proxmark3 platforms, given that everything is running the same version.
It's possible to explicitly skip the Qt support in the compilation even if Qt is present on the host, with:
```
make clean
make SKIPQT=1
```
## Firmware ## Firmware
By default, the firmware is of course tuned for the Proxmark3 Rdv4.0 device, which has built-in support for 256kb onboard flash SPI memory, Sim module (smart card support), FPC connector. By default, the firmware is of course tuned for the Proxmark3 Rdv4.0 device, which has built-in support for 256kb onboard flash SPI memory, Sim module (smart card support), FPC connector.