
# For FreeBSD, comment out the line with OS_LINUX and uncomment the line
# with OS_FREEBSD, and use the 'gmake' command instead of just 'make'

NASM = nasm
NASMFLAGS = -f elf -dOS_LINUX -g
#NASMFLAGS = -f elf -dOS_FREEBSD -g

SOURCES = greet.asm strlen.asm getstr.asm putstr.asm quit.asm
OBJECTS = $(SOURCES:.asm=.o)


%.o:	%.asm
	$(NASM) $(NASMFLAGS) $< -o $@

prog:	$(OBJECTS)
	$(LD) $^ -o $@


clean:
	rm -f $(OBJECTS) prog a.out core
