DEVICE=X11

BEEPERS = beepLinux.c beepOSS.c beepX11.c
SOURCES = alarm.c morse.c alarm.h beep.h $(BEEPERS)

# The flags necessary to link with the X11 libraries.
X11LIBS = -L/usr/X11R6/lib -lX11

# Any additional flags your favorite C compiler requires to work.
CFLAGS  = -O3 -I/usr/X11R6/include

morse:	morse${DEVICE}
	rm -f $@
	ln morse${DEVICE} $@

morseX11:	morse.o beepX11.o alarm.o
	$(CC) $(X11LIBS) -o $@ morse.o beepX11.o alarm.o

morseLinux:	morse.o beepLinux.o alarm.o
	$(CC) -o $@ morse.o beepLinux.o alarm.o -lm

morseOSS:	morse.o beepOSS.o
	$(CC) $(CFLAGS) -o $@ morse.o beepOSS.o -lm

morse.o:	beep.h Makefile
beepX11.o:	beep.h alarm.h
beepLinux.o:	beep.h alarm.h
beepOSS.o:	beep.h
alarm.o:	alarm.h

clean:
	rm -f *.o morse QSO morseX11 morseLinux morseOSS
