consolidate all repos to one for archive
This commit is contained in:
28
semester_4/namenska_programska_oprema/Naloga_3/Makefile
Normal file
28
semester_4/namenska_programska_oprema/Naloga_3/Makefile
Normal file
@@ -0,0 +1,28 @@
|
||||
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
|
7
semester_4/namenska_programska_oprema/Naloga_3/main.c
Normal file
7
semester_4/namenska_programska_oprema/Naloga_3/main.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
printf("Hello World!\n");
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user