28 lines
441 B
Makefile
28 lines
441 B
Makefile
all: build run
|
|
|
|
zip:
|
|
zip naloga.zip main.c Makefile
|
|
|
|
build: main.o
|
|
ld -m elf_i386 main.o \
|
|
/usr/lib32/crt1.o \
|
|
/usr/lib32/crti.o \
|
|
/usr/lib32/crtn.o \
|
|
-dynamic-linker \
|
|
/usr/lib32/ld-linux.so.2 \
|
|
-lc -o hello \
|
|
|
|
run: hello
|
|
./hello
|
|
|
|
clean:
|
|
rm -f hello main.i main.s main.o
|
|
|
|
build_i: main.c
|
|
cpp -m32 main.c -o main.i
|
|
|
|
build_s: main.i
|
|
gcc -S -m32 main.i -o main.s
|
|
|
|
build_o: main.s
|
|
as -32 main.s -o main.o
|