# You need to install the following packages
# linux_base-7.1_5
# linux_devtools-7.1
# linux-openmotif-2.1.30

# The directory containing the above packages.
PKGDIR=/home/packages/All

# The root directory for the POPLOG tree.
INSTALLDIR=/usr/local

all:

everything: packages poplog local

# This script installs the POPLOG distribution
poplog:
	tar -C $(INSTALLDIR) -xvzf poplog.tgz
	rm -f /usr/local/poplog/v15.53e/pop/extern/lib/libXm.so
	ln -s /compat/linux/usr/X11R6/lib/libXm.so.2.1 /usr/local/poplog/v15.53e/pop/extern/lib/libXm.so

# This script installs additional libraries
local:
	tar -C $(INSTALLDIR)/poplog -xvzf local.tgz

# This script removes the necessary LINUX packages
rmpackages:
	pkg_delete linux-openmotif-2.1.30
	pkg_delete linux_devtools-7.1
	pkg_delete linux_base-7.1_5
	rm -rf /compat/linux/*

# This script installs the necessary LINUX packages.
packages:
	pkg_add $(PKGDIR)/linux_base-7.1_5.tgz
	pkg_add $(PKGDIR)/linux_devtools-7.1.tgz
	pkg_add $(PKGDIR)/linux-openmotif-2.1.30.tgz
	cp rgb.txt /compat/linux/usr/X11R6/lib/X11

# This script removes the POPLOG tree
clean:
	rm -rf $(INSTALLDIR)/poplog


