| 1 |
3 |
sergeykhbr |
###
|
| 2 |
|
|
## @file
|
| 3 |
|
|
## @copyright Copyright 2016 GNSS Sensor Ltd. All right reserved.
|
| 4 |
|
|
## @author Sergey Khabarov - sergeykhbr@gmail.com
|
| 5 |
|
|
##
|
| 6 |
|
|
|
| 7 |
|
|
include util.mak
|
| 8 |
|
|
|
| 9 |
|
|
ifeq ($(QT_PATH), )
|
| 10 |
|
|
$(error QT_PATH variable must be defined)
|
| 11 |
|
|
endif
|
| 12 |
|
|
|
| 13 |
|
|
CC=gcc
|
| 14 |
|
|
CPP=gcc
|
| 15 |
|
|
CFLAGS=-g -c -Wall -Werror -fPIC -pthread
|
| 16 |
|
|
LDFLAGS=-shared -pthread -L$(PLUGINS_ELF_DIR)/.. -L$(QT_PATH)/lib
|
| 17 |
|
|
INCL_KEY=-I
|
| 18 |
|
|
DIR_KEY=-B
|
| 19 |
|
|
|
| 20 |
|
|
GUI_PLUGIN_SRC=$(TOP_DIR)src/gui_plugin
|
| 21 |
|
|
|
| 22 |
|
|
# include sub-folders list
|
| 23 |
|
|
INCL_PATH= \
|
| 24 |
|
|
$(QT_PATH)/include \
|
| 25 |
|
|
$(TOP_DIR)src/common \
|
| 26 |
|
|
$(GUI_PLUGIN_SRC)
|
| 27 |
|
|
|
| 28 |
|
|
# source files directories list:
|
| 29 |
|
|
SRC_PATH =\
|
| 30 |
|
|
$(TOP_DIR)src/common \
|
| 31 |
|
|
$(TOP_DIR)src/gui_plugin \
|
| 32 |
|
|
$(TOP_DIR)src/gui_plugin/MainWindow \
|
| 33 |
|
|
$(TOP_DIR)src/gui_plugin/ControlWidget \
|
| 34 |
|
|
$(TOP_DIR)src/gui_plugin/CpuWidgets \
|
| 35 |
|
|
$(TOP_DIR)src/gui_plugin/GnssWidgets \
|
| 36 |
|
|
$(TOP_DIR)src/gui_plugin/PeriphWidgets
|
| 37 |
|
|
|
| 38 |
|
|
VPATH = $(SRC_PATH)
|
| 39 |
|
|
|
| 40 |
|
|
SOURCES = \
|
| 41 |
|
|
attribute \
|
| 42 |
|
|
autobuffer \
|
| 43 |
4 |
sergeykhbr |
async_tqueue \
|
| 44 |
3 |
sergeykhbr |
gui_plugin \
|
| 45 |
|
|
qt_wrapper \
|
| 46 |
|
|
ebreakhandler \
|
| 47 |
|
|
DbgMainWindow \
|
| 48 |
|
|
MdiAreaWidget \
|
| 49 |
|
|
GpioWidget \
|
| 50 |
|
|
LedArea \
|
| 51 |
|
|
DipArea \
|
| 52 |
|
|
UartEditor \
|
| 53 |
|
|
UartWidget \
|
| 54 |
|
|
RegsViewWidget \
|
| 55 |
|
|
RegWidget \
|
| 56 |
|
|
AsmViewWidget \
|
| 57 |
|
|
AsmArea \
|
| 58 |
|
|
AsmControl \
|
| 59 |
|
|
SymbolBrowserWidget \
|
| 60 |
|
|
SymbolBrowserArea \
|
| 61 |
|
|
SymbolBrowserControl \
|
| 62 |
|
|
StackTraceWidget \
|
| 63 |
|
|
StackTraceArea \
|
| 64 |
|
|
MemViewWidget \
|
| 65 |
|
|
MemArea \
|
| 66 |
|
|
MemControl \
|
| 67 |
|
|
ConsoleWidget \
|
| 68 |
|
|
StreetMapObject \
|
| 69 |
4 |
sergeykhbr |
linecommon \
|
| 70 |
3 |
sergeykhbr |
MapWidget \
|
| 71 |
4 |
sergeykhbr |
PlotWidget \
|
| 72 |
3 |
sergeykhbr |
PnpWidget
|
| 73 |
|
|
|
| 74 |
|
|
LIBS = \
|
| 75 |
|
|
m \
|
| 76 |
|
|
stdc++ \
|
| 77 |
|
|
dbg64g \
|
| 78 |
|
|
Qt5Core \
|
| 79 |
|
|
Qt5Gui \
|
| 80 |
|
|
Qt5Network \
|
| 81 |
|
|
Qt5Widgets
|
| 82 |
|
|
|
| 83 |
|
|
SRC_FILES = $(addsuffix .cpp,$(SOURCES))
|
| 84 |
|
|
OBJ_FILES = $(addprefix $(PLUGINS_OBJ_DIR)/,$(addsuffix .o,$(SOURCES)))
|
| 85 |
|
|
EXECUTABLE = $(addprefix $(PLUGINS_ELF_DIR)/,gui_plugin.so)
|
| 86 |
|
|
|
| 87 |
|
|
all: $(EXECUTABLE) deploy
|
| 88 |
|
|
|
| 89 |
|
|
deploy:
|
| 90 |
|
|
$(MKDIR) $(ELF_DIR)/qtlib
|
| 91 |
|
|
$(MKDIR) $(ELF_DIR)/qtlib/platforms
|
| 92 |
|
|
cp $(QT_PATH)/plugins/platforms/libqlinuxfb.so $(ELF_DIR)/qtlib/platforms/
|
| 93 |
|
|
cp $(QT_PATH)/plugins/platforms/libqminimal.so $(ELF_DIR)/qtlib/platforms/
|
| 94 |
|
|
cp $(QT_PATH)/lib/libicudata.* $(ELF_DIR)/qtlib
|
| 95 |
|
|
cp $(QT_PATH)/lib/libicui18n.* $(ELF_DIR)/qtlib
|
| 96 |
|
|
cp $(QT_PATH)/lib/libicuuc.* $(ELF_DIR)/qtlib
|
| 97 |
|
|
cp $(QT_PATH)/lib/libQt5Core.* $(ELF_DIR)/qtlib
|
| 98 |
|
|
cp $(QT_PATH)/lib/libQt5Gui.* $(ELF_DIR)/qtlib
|
| 99 |
|
|
cp $(QT_PATH)/lib/libQt5Widgets.* $(ELF_DIR)/qtlib
|
| 100 |
|
|
cp $(QT_PATH)/lib/libQt5Network.* $(ELF_DIR)/qtlib
|
| 101 |
|
|
|
| 102 |
|
|
$(EXECUTABLE): prebuild $(OBJ_FILES)
|
| 103 |
|
|
echo $(CPP) $(LDFLAGS) $(OBJ_FILES) -o $@
|
| 104 |
|
|
$(CPP) $(LDFLAGS) $(OBJ_FILES) -o $@ $(addprefix -l,$(LIBS))
|
| 105 |
|
|
$(ECHO) "\n Plugin '"$@"' has been built successfully.\n"
|
| 106 |
|
|
|
| 107 |
|
|
$(addprefix $(PLUGINS_OBJ_DIR)/,%.o): %.cpp
|
| 108 |
|
|
echo $(CPP) $(CFLAGS) -std=c++0x $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $@
|
| 109 |
|
|
$(CPP) $(CFLAGS) -std=c++0x $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $@
|
| 110 |
|
|
|
| 111 |
|
|
$(addprefix $(PLUGINS_OBJ_DIR)/,%.o): %.c
|
| 112 |
|
|
echo $(CC) $(CFLAGS) -std=c99 $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $@
|
| 113 |
|
|
$(CC) $(CFLAGS) -std=c99 $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $@
|
| 114 |
|
|
|
| 115 |
|
|
prebuild:
|
| 116 |
|
|
$(MKDIR) $(ELF_DIR)/resources
|
| 117 |
|
|
$(QT_PATH)/bin/rcc -binary $(GUI_PLUGIN_SRC)/resources/gui.qrc -o $(ELF_DIR)/resources/gui.rcc
|
| 118 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/qt_wrapper.h -o $(GUI_PLUGIN_SRC)/moc_qt_wrapper.h
|
| 119 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/MainWindow/DbgMainWindow.h -o $(GUI_PLUGIN_SRC)/MainWindow/moc_DbgMainWindow.h
|
| 120 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/MainWindow/MdiAreaWidget.h -o $(GUI_PLUGIN_SRC)/MainWindow/moc_MdiAreaWidget.h
|
| 121 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/ControlWidget/ConsoleWidget.h -o $(GUI_PLUGIN_SRC)/ControlWidget/moc_ConsoleWidget.h
|
| 122 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/ControlWidget/PnpWidget.h -o $(GUI_PLUGIN_SRC)/ControlWidget/moc_PnpWidget.h
|
| 123 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/PeriphWidgets/UartWidget.h -o $(GUI_PLUGIN_SRC)/PeriphWidgets/moc_UartWidget.h
|
| 124 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/PeriphWidgets/UartEditor.h -o $(GUI_PLUGIN_SRC)/PeriphWidgets/moc_UartEditor.h
|
| 125 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/PeriphWidgets/GpioWidget.h -o $(GUI_PLUGIN_SRC)/PeriphWidgets/moc_GpioWidget.h
|
| 126 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/PeriphWidgets/LedArea.h -o $(GUI_PLUGIN_SRC)/PeriphWidgets/moc_LedArea.h
|
| 127 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/PeriphWidgets/DipArea.h -o $(GUI_PLUGIN_SRC)/PeriphWidgets/moc_DipArea.h
|
| 128 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/AsmViewWidget.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_AsmViewWidget.h
|
| 129 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/AsmArea.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_AsmArea.h
|
| 130 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/AsmControl.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_AsmControl.h
|
| 131 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/MemViewWidget.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_MemViewWidget.h
|
| 132 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/MemArea.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_MemArea.h
|
| 133 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/MemControl.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_MemControl.h
|
| 134 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/RegWidget.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_RegWidget.h
|
| 135 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/RegsViewWidget.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_RegsViewWidget.h
|
| 136 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/SymbolBrowserWidget.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_SymbolBrowserWidget.h
|
| 137 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/SymbolBrowserArea.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_SymbolBrowserArea.h
|
| 138 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/SymbolBrowserControl.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_SymbolBrowserControl.h
|
| 139 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/StackTraceWidget.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_StackTraceWidget.h
|
| 140 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/StackTraceArea.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_StackTraceArea.h
|
| 141 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/GnssWidgets/StreetMapObject.h -o $(GUI_PLUGIN_SRC)/GnssWidgets/moc_StreetMapObject.h
|
| 142 |
|
|
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/GnssWidgets/MapWidget.h -o $(GUI_PLUGIN_SRC)/GnssWidgets/moc_MapWidget.h
|
| 143 |
4 |
sergeykhbr |
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/GnssWidgets/PlotWidget.h -o $(GUI_PLUGIN_SRC)/GnssWidgets/moc_PlotWidget.h
|