# Generated automatically from Makefile.in by configure.
# Makefile.in - input to 'configure'
# Copyright (C) 1998 James Bowman
# 
# This file is part of gpasm.
# 
# gpasm 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, or (at your option)
# any later version.
# 
# gpasm 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 gpasm; see the file COPYING.  If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.  */

all: gpasm

DATADIR = /usr/local/gpasm
CFLAGS = -g -O2 -D DATADIR=\"$(DATADIR)\"	# -g --pedantic -Wall
SHELL = /bin/sh

# All the objects, in alphabetical order
OBJECTS= \
	gpasm.tab.o	\
	gperror.o	\
	hex.o		\
	lst.o		\
	main.o		\
	opcode.o	\
	processor.o	\
	scan.o		\
	symbol.o	\
	util.o 

gpasm: $(OBJECTS)
	$(CC) -o gpasm $(OBJECTS) -lfl 

gpasm.tab.c gpasm.tab.h: gpasm.y
	bison -y -d gpasm.y
	mv y.tab.c gpasm.tab.c
	mv y.tab.h gpasm.tab.h

scan.c: scan.l gpasm.tab.h
	flex scan.l
	mv lex.yy.c scan.c

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

install:
	/usr/bin/install -c -m 755 gpasm /usr/local/bin
	/usr/bin/install -c -m 644 special.inc $(DATADIR)/special.inc

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

clean:
	rm -f $(OBJECTS)
	rm -f scan.c gpasm.tab.[ch]
	rm -f *.hex *.lst
	rm -f core
