ASFLAGS = -gstabs
CFLAGS = -g -Wall -pedantic
PROJECT = sum_3

.PHONY: clean

$(PROJECT): $(PROJECT).o main.o
	gcc $(CFLAGS) -o $(PROJECT) $(PROJECT).o main.o

$(PROJECT).o: $(PROJECT).s
	as $(ASFLAGS) -o $(PROJECT).o $(PROJECT).s

main.o: main.c
	gcc -c $(CFLAGS) -o main.o main.c

clean:
	rm -f *.o
	rm -f $(PROJECT)
	rm -f *~

