I need to generate a CMakeLists from:
RUN=factorial
main.o: main.c
gcc -arch i386 -c main.c
$(RUN).o: $(RUN).asm
nasm -f macho32 -o $(RUN).o $(RUN).asm
all: main.o $(RUN).o
gcc -arch i386 $(RUN).o main.o -o main
run: clean all
./main
clean:
rm -rf main.o $(RUN).o main
Mind you, I am running OSX, trying to compile a 32-bit asm program with C functions (that's why i'm using gcc) on a 64-bit machine.
Last edited on