Skip to content

Commit

Permalink
Merge pull request #129 from josh-nook/tutorial-dev
Browse files Browse the repository at this point in the history
Updated old makefile in tutorial
  • Loading branch information
IgWod authored Jul 17, 2024
2 parents a2dee17 + 434f0dd commit acd3d2b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion docs/tutorials/hipeac2024/introduction/mambo/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#PLUGINS+=plugins/symbol_example.c
#PLUGINS+=plugins/memcheck/memcheck.S plugins/memcheck/memcheck.c plugins/memcheck/naive_stdlib.c
#PLUGINS+=plugins/follow_exec.c
#PLUGINS+=plugins/hotspot.c
PLUGINS+=plugins/tutorial.c

OPTS= -DDBM_LINK_UNCOND_IMM
Expand All @@ -21,6 +22,7 @@ OPTS+=-DLINK_BX_ALT
OPTS+=-DDBM_INLINE_HASH
OPTS+=-DDBM_TRACES #-DTB_AS_TRACE_HEAD #-DBLXI_AS_TRACE_HEAD
#OPTS+=-DCC_HUGETLB -DMETADATA_HUGETLB
OPTS+=-DDBM_TRIBI

VERSION?=$(shell git describe --abbrev=8 --dirty --always || echo '\<nogit\>')
CFLAGS+=-D_GNU_SOURCE -g -std=gnu99 -O2 -Wunused-variable
Expand All @@ -30,7 +32,7 @@ LDFLAGS+=-static -ldl
LIBS=-lelf -lpthread -lz
HEADERS=*.h makefile
INCLUDES=-I/usr/include/libelf -I.
SOURCES= common.c dbm.c traces.c syscalls.c dispatcher.c signals.c util.S
SOURCES= common.c dbm.c traces.c syscalls.c dispatcher.c util.S traces_common.c
SOURCES+=api/helpers.c api/plugin_support.c api/branch_decoder_support.c api/load_store.c api/internal.c api/hash_table.c
SOURCES+=elf/elf_loader.o elf/symbol_parser.o

Expand All @@ -44,6 +46,7 @@ ifeq ($(findstring arm, $(ARCH)), arm)
SOURCES += arch/aarch32/dispatcher_aarch32.S arch/aarch32/dispatcher_aarch32.c
SOURCES += arch/aarch32/scanner_t32.c arch/aarch32/scanner_a32.c
SOURCES += api/emit_arm.c api/emit_thumb.c
SOURCES += signals.c
endif
ifeq ($(ARCH),aarch64)
HEADERS += api/emit_a64.h
Expand All @@ -52,6 +55,18 @@ ifeq ($(ARCH),aarch64)
SOURCES += arch/aarch64/dispatcher_aarch64.S arch/aarch64/dispatcher_aarch64.c
SOURCES += arch/aarch64/scanner_a64.c
SOURCES += api/emit_a64.c
SOURCES += signals.c
endif
ifeq ($(ARCH), riscv64)
HEADERS += api/emit_riscv.h
LDFLAGS += -Wl,-Ttext-segment=$(or $(TEXT_SEGMENT),0x7f000000)
PIE += pie/pie-riscv-field-decoder.o
PIE += pie/pie-riscv-encoder.o
PIE += pie/pie-riscv-decoder.o
SOURCES += arch/riscv/dispatcher_riscv.S arch/riscv/dispatcher_riscv.c
SOURCES += arch/riscv/scanner_riscv.c
SOURCES += api/emit_riscv.c
SOURCES += arch/riscv/riscv_traces.c
endif

ifdef PLUGINS
Expand Down

0 comments on commit acd3d2b

Please sign in to comment.