URL
https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk
Subversion Repositories riscv_vhdl
[/] [riscv_vhdl/] [trunk/] [debugger/] [makefiles/] [make_libdbg64g] - 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
CC=gcc
CPP=gcc
CFLAGS=-g -c -Wall -Werror -fPIC -pthread
LDFLAGS= -shared -pthread
INCL_KEY=-I
DIR_KEY=-B
# include sub-folders list
INCL_PATH=\
$(TOP_DIR)src/common \
$(TOP_DIR)src/libdbg64g
# source files directories list:
SRC_PATH =\
$(TOP_DIR)src \
$(TOP_DIR)src/common \
$(TOP_DIR)src/libdbg64g \
$(TOP_DIR)src/libdbg64g/services/mem \
$(TOP_DIR)src/libdbg64g/services/bus \
$(TOP_DIR)src/libdbg64g/services/console \
$(TOP_DIR)src/libdbg64g/services/debug \
$(TOP_DIR)src/libdbg64g/services/exec \
$(TOP_DIR)src/libdbg64g/services/exec/cmd \
$(TOP_DIR)src/libdbg64g/services/info \
$(TOP_DIR)src/libdbg64g/services/comport \
$(TOP_DIR)src/libdbg64g/services/elfloader \
$(TOP_DIR)src/libdbg64g/services/remote
VPATH = $(SRC_PATH)
SOURCES = \
attribute \
autobuffer \
api_core \
api_utils \
bus \
memsim \
serial_dbglink \
udp_dbglink \
edcl \
elfreader \
cmd_br \
cmd_busutil \
cmd_cpi \
cmd_csr \
cmd_disas \
cmd_halt \
cmd_isrunning \
cmd_loadbin \
cmd_loadelf \
cmd_loadsrec \
cmd_log \
cmd_read \
cmd_write \
cmd_reg \
cmd_regs \
cmd_reset \
cmd_run \
cmd_stack \
cmd_status \
cmd_symb \
cmd_exit \
cmd_memdump \
cmdexec \
soc_info \
console \
com_linux \
comport \
autocompleter \
tcpserver \
tcpclient \
tcpcmd
LIBS = \
m \
stdc++ \
dl
SRC_FILES = $(addsuffix .cpp,$(SOURCES))
OBJ_FILES = $(addprefix $(OBJ_DIR)/,$(addsuffix .o,$(SOURCES)))
EXECUTABLE = $(addprefix $(ELF_DIR)/,libdbg64g.so)
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJ_FILES)
echo $(CPP) $(LDFLAGS) $(OBJ_FILES) -o $@
$(CPP) $(LDFLAGS) $(OBJ_FILES) -o $@ $(addprefix -l,$(LIBS))
$(ECHO) "\n Debugger Core Library has been built successfully.\n"
$(addprefix $(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 $(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 $@