pl-sem/sem4/makefile
2023-08-18 01:08:53 +03:00

25 lines
450 B
Makefile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

GCC = gcc
ASM = nasm
ASMFLAGS = -felf64 -g
# Если есть код на C, то компоновку тоже нужно производить
# с помощью gcc, а не ld
hello: hello.o hello_mmap.o
$(GCC) $^ -o $@
# target : dependencies
# do this
hello.o: hello.c
$(GCC) -c $^ -o $@
%.o: %.asm
$(ASM) $(ASMFLAGS) $^ -o $@
clean:
$(RM) hello
$(RM) hello.o
$(RM) hello_mmap.o
all: hello
.PHONY: clean all