CC = gcc
ASM = nasm
INSTDIR = /usr/local/bin

%.o: %.c
	$(CC) -c $<

%.o: %.asm
	$(ASM) -f elf $<

gus-dj: gus-dj.o io.o
	$(CC) -o gus-dj gus-dj.o io.o
	strip gus-dj

asm: gus-dj.o io_asm.o
	$(CC) -o gus-dj gus-dj.c io_asm.o
	strip gus-dj

install:
	cp gus-dj $(INSTDIR)
	chown root $(INSTDIR)/gus-dj
	chmod 4755 $(INSTDIR)/gus-dj

clean:
	rm *.o gus-dj