# Makefile # Visualization Class, Fall 2001, Yap # # This makes Tingjen's simple thread program ############################################################ # Variables ############################################################ # compiling options: OPT= -D_YIELD OPT= # program is "p" p=thread # version is "v" v=1 v= # final program is "pv" pv=$(p)$(v) # Platform is one of the following: cyg(win), solaris, sgi, linux pf = sgi pf = linux pf = cyg pf = unix # compiler CC = g++ CC = gcc # extension ifeq ($(CC),gcc) ext = c else ext = cc endif # Runtime libraries and Include Headers ifeq ($(pf),cyg) LIBS= -L\bin -lglut32 -LC:\WINNT\system32 -lopengl32 -lglu32 INC= -I\usr\include exe = .exe WINDOZ = -D_WINDOZ else LIBS = -L/usr/unsupported/installers/yentj/Mesa-4.0/lib \ -lglut -lGLU -lGL -lXmu -lXi -lXext -lX11 -lm -lsocket -lnsl INC = -I/usr/unsupported/installers/yentj/Mesa-4.0/include exe = WINDOZ = endif # platform specific targets ############################################################ all: thread thread: ifeq ($(pf),cyg) gcc $(OPT) thread.c -o thread else gcc $(OPT) -lpthread -lposix4 thread.c -o thread endif ############################################################ # housekeeping ############################################################ tar: -@tar -cvf T.tar \ Makefile README *.$(ext) *.h save: ifeq ($(pf),unix) -@ci -l *.$(ext) Make* README else -@cp *.$(ext) Make* README RCS endif clean: -@rm -f *.o veryclean: clean -@rm -f $(pv)$(exe) ############################################################ # THE END ############################################################