## ## ES1 Makefile ## ## ## Flags used for compiling. -O for optimization, which is optional. ## If the X11 include files are not located in /usr/include/X11, you ## must specify the directory as a flag prefixed by -I. For instance, ## if the include files for X11 are located in /usr/local/include, the ## flag -I/usr/local/include must also be passed. ## ## ## Libraries and their directories used in loading. Normal is -lm and -lX11 ## for the Math and X11 libraries, which is NOT optional. On Unicos, -lnet ## is also used. If the X11 libraries are not located in /usr/lib/X11, you ## must also specify the directory as a flag prefixed by -L. For instance, ## if the include files for X11 are located in /usr/local/lib, the flag ## -L/usr/local/lib must also be passed. On Sun, use -Bstatic to avoid ## problems with differing versions of OS. Man cc for more information on flags. ## ## ## ifeq ($(HOSTTYPE),sun4) FILE_EXT = .sun CC = gcc CFLAGS= -O2 LIBS = -L/usr/lib/xgrafix -L/usr/lib/Xlib -lXGC20 -ltcl -ltk -lXpm -lX11 -lm else FILE_EXT= .hp CC = cc INCLUDES= /usr/local/X11R6/include CFLAGS= -O -Aa -I$(INCLUDES) LIBS = -L/usr/local/X11R6/lib/ -L/usr/lib/xgrafix -L/usr/sww/tcl/lib -L/usr/lib/Xlib -lXGC20 -ltcl -ltk -lXpm -lX11 -lm endif # ## Linux options # ifeq ($(HOSTTYPE),i386-linux) FILE_EXT = .i386 CC = gcc XHOME= /u/hammett/public_html/courses/trieste01/codes/lib # XHOME= /afs/ictp/public/h/hammettg/lib INCLUDES= $(XHOME)/local/include CFLAGS= -O2 -I$(INCLUDES) LIBS = -L$(XHOME)/local/xgrafix -L/usr/X11R6/lib -lXGC250 -ltcl -ltk -lXpm -lX11 -lm endif # ## Alternate HOSTTYPE identifier for Linux # ifeq ($(HOSTTYPE),i386) FILE_EXT = .i386 CC = gcc XHOME= /u/hammett/public_html/courses/trieste01/codes/lib # XHOME= /afs/ictp/public/h/hammettg/lib INCLUDES= $(XHOME)/local/include CFLAGS= -O2 -I$(INCLUDES) LIBS = -L$(XHOME)/local/xgrafix -L/usr/X11R6/lib -lXGC250 -ltcl -ltk -lXpm -lX11 -lm endif ## EXEC= xes1$(FILE_EXT) ## ES1OBJ= fft.o es1.o set.o init.o move.o accel.o fields.o initwin.o all: $(ES1OBJ) $(EXEC) .c.o: es1.h $(CC) -c $(CFLAGS) $*.c $(EXEC): $(ES1OBJ) $(CC) $(CFLAGS) -o $(EXEC) $(ES1OBJ) $(LIBS) clean: @rm -f *.o *~