diff --git a/Makefile b/Makefile index ce1d577..fe3f943 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ CFLAGS += -Wno-unused-but-set-variable -Wno-unused-value -Wno-unused-label C_SOURCES = $(wildcard *.c) C_HEADERS = $(wildcard *.h) OBJECTS = $(C_SOURCES:.c=.o) +ASMS = $(C_SOURCES:.c=.s) all: $(OBJECTS) @@ -15,10 +16,16 @@ all: $(OBJECTS) @echo "CC $<" @$(CC) $(CFLAGS) -c $< -o $@ +%.s: %.c $(C_HEADERS) + @echo "CC $<" + @$(CC) $(CFLAGS) -S -masm=intel $< + clean: rm -f $(OBJECTS) +asm: $(ASMS) + format: clang-format -i $(C_SOURCES) $(C_HEADERS) -.PHONY: all clean format \ No newline at end of file +.PHONY: all clean format asm \ No newline at end of file