25 lines
518 B
Makefile

CFLAGS=-g -std=c2x -fsanitize=address -fno-omit-frame-pointer -Wall -Wextra -pedantic -O0
CC=gcc
#This will get the names of the .asm files
asm_files = $(wildcard asm_files/*.asm)
#This will convert them to .bin names
bin_files = $(patsubst %.asm,%.bin,$(asm_files))
.PHONY: build clean run all asm_files
all: decode asm_files
decode: decoder8086.odin
odin build decoder8086.odin -file
asm_files: $(bin_files)
%.bin: %.asm
nasm $< -o $@
run: all
./decode8086
clean:
rm -vf *.so *.o decoder8086 $(bin_files)