📄 readme
字号:
/********************************************************************//* XGrafix is a customized environment to run under X11. *//* (c) Copyright 1991-96 The Regent of the University of California *//* Version 2.40 *//* Authors: Vahid Vahedi, Payam Mirrashidi, Donald K. Wong, *//* John Verboncoeur, & David Cooperberg *//********************************************************************/Before You Start----------------In order to compile the XGrafix library, you must first have the following software packages/libraries installed (and know which directories they live), 1) tk4.0 or tk4.1 2) tcl7.4 or tcl7.5 3) xpm-3.4cThese packages are available at various anonymous ftp sites and arealso available from our site (ptsg.eecs.berkeley.edu in pub/tools).Please NOTE that XGrafix2.40 will not function with tk3.6. Once these packages are installed you may proceed with the compilationand installation of XGrafix.Section A. Installation----------There are two ways to install the XGrafix libraries.If your system has a complete and standard X11 installation, youcan probably use xmkmf to generate a Makefile from the providedImakefile. This is the preferred procedure to install XGrafix.We suggest you try to use this method of installation before youattempt to modify the included Makefile.If, on the other hand, your X11 installation is less thancomplete, we have provided a Makefile called Makefile.xgrafixthat you should use to compile. The Makefile works properlyon most BSD-like systems; on other operating systems, it willprobably have to be modified slightly.Please see section B to see how to generate a Makefile andcompile using xmkmf and the Imakefile. Section C explains howto set up Makefile.xgrafix correctly to compile.Section B. Compiling with xmkmf and the Imakefile----------1) First check the variable definition XGPATH in Imakefile. This MUST be defined as the final location for the library file and the associated TCL/TK scripts. For example, the variable should be set to \"/share/langmuir/xgrafix\" if the xgrafix directory is located at $(DESTDIR)/share/langmuir/xgrafix. The default is $(DESTDIR)/lib/xgrafix. Find out which version of Tcl/Tk you will be linking with and uncomment the appropriate line. (A MUST!!!) Also change TCL_H and TK_H to point to the locations where tcl.h and tk.h can be found. If you want to use the Fortran XGRAFIX, replace the Imakefile with Imakefile.Fortran.2) xmkmf Typing this should return something like the following: mv Makefile Makefile.bak imake -DUseInstalled -I/usr/lib/X11/X11/config If you do see something similar to the above continue to the next step. Otherwise, chances are that your system's X11 installation is non-standard in some way, and that you'll have to start with Makefile.xgrafix. This command takes the Imakefile and generates a Makefile specifically tailored to your system's X11 installation. It will also generate the Makefile in such a way that libraries will be built with the tools available on your system. We can only guess what installation programs you have on your system, but if X11 is installed correctly, the Makefile will reflect what tools you have.3) make all As you expect this builds the library and binary files from the sources. 4) make install DEST_DIR=<enter the base directory here> This takes the compiled files and installs them in the proper locations. It will put the libraries in the DEST_DIR/lib/xgrafix directory, and the binaries in the DEST_DIR/bin directory. If the directories do not exist, it will create them. Normally you will want to install the files in a standard location such as /usr or /usr/local, in that case use DEST_DIR=/usr or DEST_DIR=/usr/local. If you just type 'make install' without the DEST_DIR argument the Makefile will install the files in /usr. Make sure you have write permision to the directory you specify. Notes: In the Imakefile there are a couple things you may want to change to customize the installation, the FILE_EXT and SYSTEM_DEFINES. Look in the following section to see what you can change these to. Section C. Compiling with Makefile.xgrafix----------The first thing you should do before anything else iscopy Makefile.xgrafix into Makefile.Check the variable definition for XGPATH. This MUST be defined as the final location for the library file and the associated TCL/TK scripts. For example, the variable should be set to \"/share/langmuir/xgrafix\" if the xgrafix director is located at /share/langmuir/xgrafix. The default is $(DESTDIR)/lib/xgrafix.Also change EXTRA_INCLUDES to point to the location where the tcl.htk.h header files can be found.The flags in the makefile should also be set accordingly to compile properly. Ask your system administrator for the locationof the Tcl, Tk, and X11 libraries. Note that the makefile attempts to compilea portion of xgrafix with a FORTRAN compiler. This portion is ofxgrafix is needed only if the physics kernel is written in FORTRANas opposed to C.The following is an explanation of what the definitions inthe Makefile mean:SYSTEM: The type of system on which the code is compiled. The selection includes: SUN, DEC, IBM, HP or UNICOS. The dump files created by code are stored in the IEEE standard binary format. Since Sun OS and Unicos do NOT follow this format, the code has to read and write binary files according to the type of machine. FILE_EXT: File extension (Optional). Typically undefined. This is useful if you have your home directory mounted on several different machine architectures, i.e sun, dec, ibm...CC: C compiler. Normally gcc.FC: FORTRAN compiler. Normally f77.RM: Which remove command to use.AR: Archive compiler which builds the libraries.RANLIB: Converts archives into random libraries.INSTALL: Installs the compiled libraries and binaries.CFLAGs/FFLAGS: 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.ARFLAGS: These flags do the following: r, replaces the specified files in the archive file. c, Suppresses the message when the archiver creates the archive. l, places temporary files in the local directory.INSTFLAGS: These flags are for the install program which copies the libraries to their proper location in the file structure. The -m 644 default means that the owner of the file has read and write permision and other users just have read permision. The values are octal based: 4 for read, 2 for write and 1 for execute. The order is owner,group and other users.INSTFLAGSBIN: These flags have the same format as INSTFLAGS except that they are applied to the binary executable files that are generated. Thus the default is -m 755. The owner has read, write and execute permisions, while others just have read and execute permissions.DEST_BIN_DIR:DEST_LIB_DIR: These are the places where the compiled binaries and libraries are placed respectively after compilation. We have left the defaults to be directories in the source tree of xgrafix, because you are guaranteed to have write permission to that directory. Other standard locations are: DEST_BIN_DIR: /usr/local/bin DEST_LIB_DIR: /usr/local/lib Make sure you are either root or have write permissions to the directories you have chosen. Or else, you'll get write permission errors. After you modify the makefile, type make and it will make and install XGrafix for you. The xgrafix repository is located at: fusion.txcorp.com:/fusion/pubproj
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -