# Makefile -- ASpringies' makefile for the SAS/C compiler
# Copyright (C) 1994 Torsten Klein
#
# This file is part of ASpringies, a mass and spring simulation system for the Amiga
#
# ASpringies 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 1, or (at your option)
# any later version.
#
# ASpringies is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ASpringies; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Id: Makefile,v 1.11 1994/08/19 11:51:46 Torsten_Klein Exp $ 

MAIN 		= ASpringies
OBJS	  	= main.o SetUpMui.o obj.o misc.o newmain.o file.o phys.o 
CC		= sc
LIBS 		= LIB:scm881.lib LIB:sc.lib LIB:amiga.lib
BACKUP 		= sys:t/ASpringies.lha

$(MAIN) 	: /COPYING /ReadMe.mui tags SCOPTIONS $(MAIN).GST $(OBJS) \
	 /$(MAIN).guide
	slink LIB:c.o $(OBJS) with lib:utillib.with TO $(MAIN) LIB $(LIBS) batch

backup 		: clean
	lha -erxQa u $(BACKUP) #?
	lha t $(BACKUP)

clean           : 
	-Delete @* *! *.info *.o $(MAIN) $(MAIN).GST TAGS prof.out
	-rcsclean

tags		: 
	-etags -t *.c

$(MAIN).GST	:
	-c:Delete gstfile.c
	-egrep >gstfile -h -e "include <" \#?.c \#?.h
	-c:Rename gstfile gstfile.c
	-$(CC) MGST=$(MAIN).GST gstfile.c NOSTRICT
	-delete gstfile.c  gstfile.o
	-avail flush	# to remove resident gst file

################################

misc.o     : misc.c defs.h main.h
obj.o      : obj.c obj.h defs.h
phys.o     : defs.h obj.h phys.c
file.o     : defs.h obj.h file.c
main.o     : main.c main.h defs.h obj.h
SetUpMui.o : SetUpMui.c main.h
newmain.o  : newmain.c defs.h obj.h main.h
