#******************************************************************************
#                  Makefile for the GNU Spice GUI HTML Files                  *
#                                                                             *
#  Started     : 06/04/2004                                                   *
#  Last update : 01/06/2007                                                   *
#  Copyright   : (C) 2004 by MSWaters                                         *
#  Email       : M.Waters@bom.gov.au                                          *
#******************************************************************************

#******************************************************************************
#                                                                             *
#     This program is free software; you can redistribute it and/or modify    *
#     it under the terms of the GNU General Public License as published by    *
#     the Free Software Foundation; either version 2 of the License, or       *
#     (at your option) any later version.                                     *
#                                                                             *
#******************************************************************************

#******************************************************************************
# Specify string values
#******************************************************************************

# Root directory
ROOT := $(shell cd .. ; pwd)

# Install directory
INSTALLDIR = /usr/local

#******************************************************************************
# Make these targets
#******************************************************************************

all : 

#******************************************************************************
# Perform installation tasks
#******************************************************************************

install :
	mkdir -p $(INSTALLDIR)/share/gspiceui/html
	cp $(ROOT)/html/*.html       $(INSTALLDIR)/share/gspiceui/html
	cp $(ROOT)/html/*.jpeg       $(INSTALLDIR)/share/gspiceui/html

#******************************************************************************
# Perform uninstall tasks
#******************************************************************************

uninstall :
	rm -fR $(INSTALLDIR)/share/gspiceui/html

#******************************************************************************
# Remove temporary files and backup files
#******************************************************************************

clean : 
	rm -f OM-*.jpeg Makefile~ *.html~

#******************************************************************************
# Specify phony targets
#******************************************************************************

.PHONY : install uninstall clean

#******************************************************************************
