07-24-2023, 04:50 AM
I've come across this task to build a Makefile for a program in assembly language I made (nothing fancy, like a hello world). The program is in Linux 32 bits and I'm using NASM assembler. So far I can only find Makefiles for programs for C, I'm aware that there's not much difference from one to another but I'm not familiar with this thing. What I have is this:
Program: main.o
gcc -o Program main.o
main.o: main.asm
nasm -f elf -g -F stabs main.asm
I can't tell whether this is correct or, if it does, how it works. I can't try the code because this computer doesn't have Linux. I really would like to know what's going on in the code.
Program: main.o
gcc -o Program main.o
main.o: main.asm
nasm -f elf -g -F stabs main.asm
I can't tell whether this is correct or, if it does, how it works. I can't try the code because this computer doesn't have Linux. I really would like to know what's going on in the code.