# POSIX makefile for compiling and testing Voyager 1 and 2 calibrated # and corrected full resolution spectrum analyzer data listers. # # Instructions: # # (1) Copy all files from the EXTRAS/SOFTWARE/C volume directory to # a writable directory. # # (2) Edit the entry for CC below for your platform if necessary. # # (3) make -f VGPWS_SA_LIST.MAK # # (4) make -f VGPWS_SA_LIST.MAK test CC = gcc CFLAGS = -O build: vg1pws_sa_list vg2pws_sa_list test: test1 test2 # Make newline terminated source vg1pws_sa_list.c: VG1PWS_SA_LIST.C tr -d \\r < VG1PWS_SA_LIST.C > vg1pws_sa_list.c vg1pws_sa_list: vg1pws_sa_list.c $(CC) $(CFLAGS) -o vg1pws_sa_list vg1pws_sa_list.c # Make newline terminated source vg2pws_sa_list.c: VG2PWS_SA_LIST.C tr -d \\r < VG2PWS_SA_LIST.C > vg2pws_sa_list.c vg2pws_sa_list: vg2pws_sa_list.c $(CC) $(CFLAGS) -o vg2pws_sa_list vg2pws_sa_list.c test1: vg1pws_sa_list verify1.txt verify1.diff @test ! -s verify1.diff && echo "vg1pws_sa_list is CORRECT" \ || echo "vg1pws_sa_list verification FAILED! See verify1.diff." verify1.txt: vg1pws_sa_list TESTIN1.DAT ./vg1pws_sa_list < TESTIN1.DAT verify1.diff: verify1.txt TESTOUT1.TXT -diff TESTOUT1.TXT verify1.txt > verify1.diff test2: vg2pws_sa_list verify2.txt verify2.diff @test ! -s verify2.diff && echo "vg2pws_sa_list is CORRECT" \ || echo "vg2pws_sa_list verification FAILED! See verify2.diff." verify2.txt: vg2pws_sa_list TESTIN2.DAT ./vg2pws_sa_list < TESTIN2.DAT verify2.diff: verify2.txt TESTOUT2.TXT -diff TESTOUT2.TXT verify2.txt > verify2.diff clean: rm vg1pws_sa_list vg1pws_sa_list.c vg2pws_sa_list vg2pws_sa_list.c rm verify1.diff verify1.txt verify2.diff verify2.txt