UP

COMPILING XSCHEM

After getting the source package (xschem-<version>.tar.gz) you should first untar the archive and enter the 'src' directory;

 user:~$ tar zxvf xschem-<version>.tar.gz 
 user:~$ cd xschem-<version>
 user:~/xschem-<version>$ cd src
 user:~/xschem-<version>/src$
 

In order to be able to build the program you need the following packages installed on the system:

for Debian and Ubuntu systems these are the packages you should check to be installed. Tck/Tk versions may vary on different systems, 8.4, 8.5, 8.6 versions are all good.

  tcl8.6                libx11-dev
  tk8.6                 libxpm-dev
  tcl8.6-dev            bison
  tk8.6-dev             flex
  gawk or mawk   
 

Edit the prefix, the user_library_dir and system_library_dir variables in the Makefile; prefix specifies the root directory where the xschem binary will be installed (${prefix}/bin) and its support files (${prefix}/share/xschem) and docs (${prefix}/share/doc/xschem). The user_library_dir variable specifies where xschem design example files are stored. This dir should be placed somewhere under the user's home. The system_library_dir variable specifies where xschem system-wide symbols files are stored. The xschem package provides some sample libraries and examples. These paths can be (should be) changed by the user in the xschem startup files.
Next, edit the rest of the Makefile and check if paths for libraries match with your system. In particular you should set the TCLVER variable to the correct TCL-TK version installed on the system.

## set prefix for installation
## XSCHEM will install in ${prefix}/bin, ${prefix}/share/xschem 
## and ${prefix}/share/doc/xschem
prefix=$(HOME)

## specify user schematic/symbol libraries; 
## you may redefine it later in .xschem or xschemrc startup files
user_library_dir=$(HOME)/xschem_library

## specify system-wide symbol libraries;
## you may redefine it later in .xschem or xschemrc startup files
system_library_dir=${prefix}/share/xschem/xschem_library

 

now you are ready to compile the program:

 user:~/xschem$ make
 

If the compile process ends without errors, the xschem binary should be built and ready for installation