I have a game source code but I could not assemble it on nasm , I could not understand where is the problem .
here is the makefile :
# Makefile for the nibbles game.
all: nibbles_asm nibbles_asm_start
# Rule for compiling C source
.c.o:
gcc -Os -march=i686 -Wall -g -c $<
# Rule for compiling assembly source
.S.o:
as -gstabs $^ -o $@
# ASM game
nibbles_asm: main.o nibbles.o helpers.o
gcc -lcurses $^ -o -V $@
# ASM game
nibbles_asm_start: start.o nibbles.o helpers.o workaround.o
gcc -lcurses -lc -nostdlib $^ -o $@
clean:
rm -f *~
rm -f *.o
rm -f nibbles nibbles_asm
and here is the error :
as -o nibbles.o nibbles.s
gcc -lcurses main.o nibbles.o helpers.o -o -V nibbles_asm
gcc: nibbles_asm: No such file or directory
make: *** [nibbles_asm] Error 1
it seems that as -gstabs $^ -o $@ do not build the nibbles_asm file ! I also typed the command by myself in terminal but it gave me alot of errors . my friend run this code on his computer , so the code does not have any problem .
There is no dependency to get from nibbles.S to nibbles.o. Also, helpers.o and workaround.o don't have associated source file relations. Add those relationship and it should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With