#******************************************************************************
#                                  Makefile                                   *
#                                 ----------                                  *
# Description : Makefile for GNU Spice GUI project xfig diagrams.             *
# Started     : 06/04/2004                                                    *
# Last update : 16/09/2009                                                    *
# 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
#******************************************************************************

# Which figure translator
TRANS = fig2dev

# Directories
ROOT := $(shell cd .. ; pwd)
OBJDIR = $(ROOT)/html

# Objects
OBJS := $(patsubst %.fig,$(OBJDIR)/%.jpeg,$(wildcard *.fig))

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

all : $(OBJS)

# Compiler Rules
# ($< is the name of the first dependency)
# ($@ is the file name of the target)
# (-L is the output graphics language)
# (-m is the magnification at which the figure is rendered)

$(OBJDIR)/%.jpeg : %.fig
	$(TRANS) -L jpeg -m 1.0 $< $@

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

clean :
	rm -f Makefile~ *.bak

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

.PHONY : clean

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