ysyx-workbench/abstract-machine/scripts/native.mk
xinyangli 8e4feb4010 NJU-ProjectN/abstract-machine ics2023 initialized
NJU-ProjectN/abstract-machine 3348db971fd860be5cb28e21c18f9d0e65d0c96a Merge pull request #8 from Jasonyanyusong/master
2023-12-21 00:20:42 +08:00

27 lines
687 B
Makefile

AM_SRCS := native/trm.c \
native/ioe.c \
native/cte.c \
native/trap.S \
native/vme.c \
native/mpe.c \
native/platform.c \
native/ioe/input.c \
native/ioe/timer.c \
native/ioe/gpu.c \
native/ioe/audio.c \
native/ioe/disk.c \
CFLAGS += -fpie
ASFLAGS += -fpie -pie
comma = ,
LDFLAGS_CXX = $(addprefix -Wl$(comma), $(LDFLAGS))
image:
@echo + LD "->" $(IMAGE_REL)
@g++ -pie -o $(IMAGE) -Wl,--whole-archive $(LINKAGE) -Wl,-no-whole-archive $(LDFLAGS_CXX) -lSDL2 -ldl
run: image
$(IMAGE)
gdb: image
gdb -ex "handle SIGUSR1 SIGUSR2 SIGSEGV noprint nostop" $(IMAGE)