URL
https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk
Subversion Repositories riscv_vhdl
[/] [riscv_vhdl/] [trunk/] [debugger/] [makefiles/] [make_gui_plugin] - Rev 4
Compare with Previous | Blame | View Log
###
## @file
## @copyright Copyright 2016 GNSS Sensor Ltd. All right reserved.
## @author Sergey Khabarov - sergeykhbr@gmail.com
##
include util.mak
ifeq ($(QT_PATH), )
$(error QT_PATH variable must be defined)
endif
CC=gcc
CPP=gcc
CFLAGS=-g -c -Wall -Werror -fPIC -pthread
LDFLAGS=-shared -pthread -L$(PLUGINS_ELF_DIR)/.. -L$(QT_PATH)/lib
INCL_KEY=-I
DIR_KEY=-B
GUI_PLUGIN_SRC=$(TOP_DIR)src/gui_plugin
# include sub-folders list
INCL_PATH= \
$(QT_PATH)/include \
$(TOP_DIR)src/common \
$(GUI_PLUGIN_SRC)
# source files directories list:
SRC_PATH =\
$(TOP_DIR)src/common \
$(TOP_DIR)src/gui_plugin \
$(TOP_DIR)src/gui_plugin/MainWindow \
$(TOP_DIR)src/gui_plugin/ControlWidget \
$(TOP_DIR)src/gui_plugin/CpuWidgets \
$(TOP_DIR)src/gui_plugin/GnssWidgets \
$(TOP_DIR)src/gui_plugin/PeriphWidgets
VPATH = $(SRC_PATH)
SOURCES = \
attribute \
autobuffer \
async_tqueue \
gui_plugin \
qt_wrapper \
ebreakhandler \
DbgMainWindow \
MdiAreaWidget \
GpioWidget \
LedArea \
DipArea \
UartEditor \
UartWidget \
RegsViewWidget \
RegWidget \
AsmViewWidget \
AsmArea \
AsmControl \
SymbolBrowserWidget \
SymbolBrowserArea \
SymbolBrowserControl \
StackTraceWidget \
StackTraceArea \
MemViewWidget \
MemArea \
MemControl \
ConsoleWidget \
StreetMapObject \
linecommon \
MapWidget \
PlotWidget \
PnpWidget
LIBS = \
m \
stdc++ \
dbg64g \
Qt5Core \
Qt5Gui \
Qt5Network \
Qt5Widgets
SRC_FILES = $(addsuffix .cpp,$(SOURCES))
OBJ_FILES = $(addprefix $(PLUGINS_OBJ_DIR)/,$(addsuffix .o,$(SOURCES)))
EXECUTABLE = $(addprefix $(PLUGINS_ELF_DIR)/,gui_plugin.so)
all: $(EXECUTABLE) deploy
deploy:
$(MKDIR) $(ELF_DIR)/qtlib
$(MKDIR) $(ELF_DIR)/qtlib/platforms
cp $(QT_PATH)/plugins/platforms/libqlinuxfb.so $(ELF_DIR)/qtlib/platforms/
cp $(QT_PATH)/plugins/platforms/libqminimal.so $(ELF_DIR)/qtlib/platforms/
cp $(QT_PATH)/lib/libicudata.* $(ELF_DIR)/qtlib
cp $(QT_PATH)/lib/libicui18n.* $(ELF_DIR)/qtlib
cp $(QT_PATH)/lib/libicuuc.* $(ELF_DIR)/qtlib
cp $(QT_PATH)/lib/libQt5Core.* $(ELF_DIR)/qtlib
cp $(QT_PATH)/lib/libQt5Gui.* $(ELF_DIR)/qtlib
cp $(QT_PATH)/lib/libQt5Widgets.* $(ELF_DIR)/qtlib
cp $(QT_PATH)/lib/libQt5Network.* $(ELF_DIR)/qtlib
$(EXECUTABLE): prebuild $(OBJ_FILES)
echo $(CPP) $(LDFLAGS) $(OBJ_FILES) -o $@
$(CPP) $(LDFLAGS) $(OBJ_FILES) -o $@ $(addprefix -l,$(LIBS))
$(ECHO) "\n Plugin '"$@"' has been built successfully.\n"
$(addprefix $(PLUGINS_OBJ_DIR)/,%.o): %.cpp
echo $(CPP) $(CFLAGS) -std=c++0x $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $@
$(CPP) $(CFLAGS) -std=c++0x $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $@
$(addprefix $(PLUGINS_OBJ_DIR)/,%.o): %.c
echo $(CC) $(CFLAGS) -std=c99 $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $@
$(CC) $(CFLAGS) -std=c99 $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $@
prebuild:
$(MKDIR) $(ELF_DIR)/resources
$(QT_PATH)/bin/rcc -binary $(GUI_PLUGIN_SRC)/resources/gui.qrc -o $(ELF_DIR)/resources/gui.rcc
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/qt_wrapper.h -o $(GUI_PLUGIN_SRC)/moc_qt_wrapper.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/MainWindow/DbgMainWindow.h -o $(GUI_PLUGIN_SRC)/MainWindow/moc_DbgMainWindow.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/MainWindow/MdiAreaWidget.h -o $(GUI_PLUGIN_SRC)/MainWindow/moc_MdiAreaWidget.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/ControlWidget/ConsoleWidget.h -o $(GUI_PLUGIN_SRC)/ControlWidget/moc_ConsoleWidget.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/ControlWidget/PnpWidget.h -o $(GUI_PLUGIN_SRC)/ControlWidget/moc_PnpWidget.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/PeriphWidgets/UartWidget.h -o $(GUI_PLUGIN_SRC)/PeriphWidgets/moc_UartWidget.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/PeriphWidgets/UartEditor.h -o $(GUI_PLUGIN_SRC)/PeriphWidgets/moc_UartEditor.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/PeriphWidgets/GpioWidget.h -o $(GUI_PLUGIN_SRC)/PeriphWidgets/moc_GpioWidget.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/PeriphWidgets/LedArea.h -o $(GUI_PLUGIN_SRC)/PeriphWidgets/moc_LedArea.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/PeriphWidgets/DipArea.h -o $(GUI_PLUGIN_SRC)/PeriphWidgets/moc_DipArea.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/AsmViewWidget.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_AsmViewWidget.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/AsmArea.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_AsmArea.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/AsmControl.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_AsmControl.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/MemViewWidget.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_MemViewWidget.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/MemArea.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_MemArea.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/MemControl.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_MemControl.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/RegWidget.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_RegWidget.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/RegsViewWidget.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_RegsViewWidget.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/SymbolBrowserWidget.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_SymbolBrowserWidget.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/SymbolBrowserArea.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_SymbolBrowserArea.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/SymbolBrowserControl.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_SymbolBrowserControl.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/StackTraceWidget.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_StackTraceWidget.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/CpuWidgets/StackTraceArea.h -o $(GUI_PLUGIN_SRC)/CpuWidgets/moc_StackTraceArea.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/GnssWidgets/StreetMapObject.h -o $(GUI_PLUGIN_SRC)/GnssWidgets/moc_StreetMapObject.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/GnssWidgets/MapWidget.h -o $(GUI_PLUGIN_SRC)/GnssWidgets/moc_MapWidget.h
$(QT_PATH)/bin/moc -i $(GUI_PLUGIN_SRC)/GnssWidgets/PlotWidget.h -o $(GUI_PLUGIN_SRC)/GnssWidgets/moc_PlotWidget.h