Jan Labanowski - jkl@ccl.net, 1997. Before you can compile the program, you need to edit the Makefile. First, check if your C compiler is called cc or gcc and use this for CC and LD. If your machine is among the ones listed in the Makefile, just uncomment the lines for this machine by removing # sign in the first column. Then type make and the xbsa executable should be produced. FOR IBM SP2 YOU NEED TO UNCOMMENT LINE IN ms_sleep3.c !!! The files testanim.* are included for testing. Just call the program: xbsa testanim and see if it works by pressing capital A and the capital Q when you finished. The complete manual is provided in the ./src directory. If you get some warnings during compilation, you may be OK. If you get errors, you are in trouble. The things to look for are the -I (include) and -L (library) paths. SysAdms put them in different places, and you may need different arrangements even under the same operating system. If your machine is not on the list, you need to create a block of macros for it in the Makefile: ## Some machine #CC = #LD = #SLEEP = ms_sleepX.c #LDLIBS = -L/usr/X11R6/lib -lm -lX11 #INCROOT = -I/usr/X11/include #CFLAGS = #LDFLAGS = While most things are standard here, the SLEEP is a thing which you need to experiment with. The SLEEP represents a routine which suspends program for a given number of miliseconds. Unfortunately each UNIX is created different, and there is no uniform way of putting program to sleep for less than 1 second (for more than a second, there is a standard routine sleep(t)). To make an intelligent choice, use the following wrapper for the routines: /* testsleep.c ========================================== */ #include #include main(argc, argv) int argc; char **argv; { int i, t; if(argc != 2) { fprintf(stderr,"Usage: test time_in_msec\n"); exit(0); } t = atoi(argv[1]); fprintf(stderr, "single interval t=%d msec\n", t); fprintf(stderr, "Time between beeps (ten intervals) = %.1f seconds\n", 0.01*t); fprintf(stderr, "\07"); for(i=0; i < 10; i++) { ms_sleep(t); fprintf(stdout,"%d\n", i+1); } fprintf(stdout,"\07\n"); exit(0); } /* ========== end of testsleep ==============================*/ and create small testing programs for each routine using commands: cc -o testX testsleep.c ms_sleepX.c where X denotes the version of ms_sleep. Read comments in each ms_sleep, since you may need to link some additional libraries. Then check the resulting executables test1, test2, .... test7, by using: testX 500 for 500 miliseconds sleeps, and choose the one which works. If you found that, say, ms_sleep4.c works for you, place the following line in the Makefile: SLEEP = ms_sleep4.c and issue the make command. If you create an executable for the machines which are not listed in the make file, I would be thankful if you could share it with the community and upload it to CCL archives (together with make macros which you added to Makefile). If make your own additions, please mark them clearly in the source, and share the source too (there are many things which can be added to this nice little piece of software). Jan Labanowski (jkl@ccl.net)