LD = ld 
AS = as 
CC = gcc
CFLAGS = -Wall -O2 -g
LFLAGS = 

all:	hello_exit_arm hello_world hello_world.static hello_world_arm \
	print_string_arm

hello_world:	hello_world.o
	$(CC) $(LFLAGS) -o hello_world hello_world.o

hello_world.static:	hello_world.o
	$(CC) $(LFLAGS) -static -o hello_world.static hello_world.o

hello_world.o:	hello_world.c
	$(CC) $(CFLAGS) -c hello_world.c

hello_exit_arm:	hello_exit_arm.o
	$(LD) -o hello_exit_arm hello_exit_arm.o

hello_exit_arm.o:	hello_exit_arm.s
	$(AS) -o hello_exit_arm.o hello_exit_arm.s


hello_world_arm:	hello_world_arm.o
	$(LD) -o hello_world_arm hello_world_arm.o

hello_world_arm.o:	hello_world_arm.s
	$(AS) -o hello_world_arm.o hello_world_arm.s

print_string_arm:	print_string_arm.o
	$(LD) -o print_string_arm print_string_arm.o

print_string_arm.o:	print_string_arm.s
	$(AS) -o print_string_arm.o print_string_arm.s

clean:	
	rm -f *~ *.o hello_exit_arm hello_world hello_world_arm hello_world.static hello_world.s print_string_arm
