functions.o: functions.s
	as -g -o functions.o functions.s

functions: functions.o
	gcc -o functions functions.o
	rm -f functions.o

memory.o: memory.s
	as -g -o memory.o memory.s

memory: memory.o
	gcc -o memory memory.o
	rm -f memory.o

challenge.o: challenge.s
	as -g -o challenge.o challenge.s

challenge: challenge.o
	gcc -o challenge challenge.o
	rm -f challenge.o

all: functions functions.o memory memory.o challenge challenge.o

clean:
	rm -f functions
	rm -f functions.o
	rm -f memory
	rm -f memory.o
	rm -f challenge
	rm -f challenge.o