# makefile for xradiotrack program 
# 
# handmade the oldfashioned way because flex generates code which will
# produce warnings, and also to be understandable to anyone who never
# studied the use of Imake. (meaning I didn't)
#

OBJS=xradiotrack.o config.o xpriv.o xradioinit.o xcard.o

LNKOPTS=-lfl -L/usr/X11R6/lib -lXaw -lXt -lX11

CC         = gcc -Wall -m486 -O2

xradiotrack:  xradiotrack.c $(OBJS)
	$(CC) -o $@ $(OBJS)  $(LNKOPTS)
	strip xradiotrack

xradiotrack.o : xradiotrack.c xradiotrack.h commondefs.h
	$(CC) -c xradiotrack.c

config.o : config.l config.h commondefs.h
	flex config.l
	gcc -c -pedantic -W -Wparentheses -o config.o lex.yy.c
	rm lex.yy.c

xpriv.o : xpriv.c
	$(CC) -c xpriv.c

xradioinit.o : xradioinit.c xradioinit.h commondefs.h
	$(CC) -c xradioinit.c

xcard.o : xcard.c commondefs.h
	$(CC) -c xcard.c

clean:  
	rm -f *.o xradiotrack
	
all:    clean xradiotrack

