# add -DDEBUG if needed.. ml
CC = cc 
CFLAGS = -g 
BINDIR = /disk2/martin/bin/elf
MANDIR = /usr/man
MANEXT = l

SRC = transpose.c iso.c chord.c grid.c chord.man Makefile
VMSSTUFF = makefile.vms chord.rnh argproc.c
INCL = chord.h
OBJ = grid.o iso.o chord.o transpose.o
SONGS = songs/heaven songs/you_ve_got_a_friend

all: chord

chord : $(OBJ) $(INCL)
	$(CC) $(CFLAGS) -o chord $(OBJ)

install : all
	cp chord $(BINDIR)
	rm -f $(MANDIR)/cat$(MANEXT)/chord.$(MANEXT)
	cp chord.man $(MANDIR)/man$(MANEXT)/chord.$(MANEXT)
	chmod 666 $(MANDIR)/man$(MANEXT)/chord.$(MANEXT)
	
shar : $(SRC)
	shar -F -l 60 -o chord.part $(SRC) $(INCL) $(SONGS) $(VMSSTUFF) README

lint : $(SRC)
	lint iso.c chord.c grid.c 

clean:
	rm -f core *.o chord 
