
CFLAGS = -O -lgpib 

PROGS = rd10 rd1 rd2 rd5 rd6 rd rdp rdphase  rdx rdxp ibtest td td4 tdk tp

all:$(PROGS)

tgz:clean
	cd ..; tar cvfz /tmp/gpibwa7kgx.tgz rd

rd10:rd10.c
	cc rd10.c $(CFLAGS)  -o rd10
rd1:rd1.c
	cc rd1.c $(CFLAGS)  -o rd1
rd2:rd2.c
	cc rd2.c $(CFLAGS)  -o rd2
rd5:rd5.c
	cc rd5.c $(CFLAGS)  -o rd5
rd6:rd6.c
	cc rd6.c $(CFLAGS)  -o rd6
rd:rd.c
	cc rd.c $(CFLAGS)  -o rd
rdx:rdx.c
	cc rdx.c $(CFLAGS)  -o rdx
rdphase:rdphase.c
	cc rdphase.c $(CFLAGS)  -o rdphase
rdp:rdxp.c
	cc rdxp.c $(CFLAGS) -DPHASEONLY  -o rdp
rdxp:rdxp.c
	cc rdxp.c $(CFLAGS)  -o rdxp
ibtest:ibtest.c
	cc ibtest.c $(CFLAGS)  -o ibtest
td:td.c iplot.c
	cc td.c iplot.c  $(CFLAGS)  -lgpib -o td
td4:td4.c iplot.c
	cc td4.c iplot.c $(CFLAGS)  -o td4
tdk:tdk.c
	cc tdk.c $(CFLAGS)  -o tdk
tp:tp.c
	cc tp.c $(CFLAGS)  -lgpib -o tp

install:$(PROGS)
	cp -fp $(PROGS) ~/bin
clean:
	rm -f $(PROGS) a.out foo
cpq:
	cpq 0R* *.h *.c
