Skip to content

Commit

Permalink
Makefile: support dependency tracking for GNU-assembler sources (.s)
Browse files Browse the repository at this point in the history
  • Loading branch information
BartmanAbyss committed Feb 13, 2024
1 parent c462e31 commit ae6e6c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ See PR links for more information.

## 1.7.8
- FIX: disassembly: fix error message when hovering over the cycle counts of an illegal instruction
- NEW: Makefile: support dependency tracking for GNU-assembler sources (`.s`)

## 1.7.7
- FIX: Resource bitmap colors red & blue swapped [#226](https://github.com/BartmanAbyss/vscode-amiga-debug/issues/226)
Expand Down
11 changes: 6 additions & 5 deletions template/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ objects := $(cpp_objects) $(c_objects) $(s_objects) $(vasm_objects)
program = out/a
OUT = $(program)
CC = m68k-amiga-elf-gcc
AS = m68k-amiga-elf-as
VASM = vasmm68k_mot

ifdef WINDOWS
Expand All @@ -33,10 +34,10 @@ else
SDKDIR = $(abspath $(dir $(shell which $(CC)))../m68k-amiga-elf/sys-include)
endif

CCFLAGS = -g -MP -MMD -m68000 -Ofast -nostdlib -Wextra -Wno-unused-function -Wno-volatile-register-var -fomit-frame-pointer -fno-tree-loop-distribution -flto -fwhole-program -fno-exceptions -ffunction-sections -fdata-sections
CPPFLAGS= $(CCFLAGS) -fno-rtti -fcoroutines -fno-use-cxa-atexit
ASFLAGS = -Wa,-g,--register-prefix-optional,-I$(SDKDIR),-D
LDFLAGS = -Wl,--emit-relocs,--gc-sections,-Ttext=0,-Map=$(OUT).map
CCFLAGS = -g -MP -MMD -m68000 -Ofast -nostdlib -Wextra -Wno-unused-function -Wno-volatile-register-var -fomit-frame-pointer -fno-tree-loop-distribution -flto -fwhole-program -fno-exceptions -ffunction-sections -fdata-sections
CPPFLAGS = $(CCFLAGS) -fno-rtti -fcoroutines -fno-use-cxa-atexit
ASFLAGS = -mcpu=68000 -g --register-prefix-optional -I$(SDKDIR)
LDFLAGS = -Wl,--emit-relocs,--gc-sections,-Ttext=0,-Map=$(OUT).map
VASMFLAGS = -m68000 -Felf -opt-fconst -nowarn=62 -dwarf=3 -quiet -x -I. -I$(SDKDIR)

all: $(OUT).exe
Expand Down Expand Up @@ -70,7 +71,7 @@ $(c_objects) : obj/%.o : %.c

$(s_objects): obj/%.o : %.s
$(info Assembling $<)
@$(CC) $(CCFLAGS) $(ASFLAGS) -c -o $@ $(CURDIR)/$<
@$(AS) $(ASFLAGS) --MD $(@D)/$*.d -o $@ $(CURDIR)/$<

$(vasm_objects): obj/%.o : %.asm
$(info Assembling $<)
Expand Down

0 comments on commit ae6e6c7

Please sign in to comment.