#############################################################################
#
#  Title	: TAVRASM Makefile
#
#  Author	: Tom Mortensen - (C) 1998
#
#  Create	: 980902
#
#  Notice       : Select compiler as appropriate (egcs or gcc)
#
#  rm/mv        : Versions of rm (remove/delete) and mv (move) that supports
#                 "Unix" style parameters must be available.
#
#############################################################################

### Program name ############################################################

EXENAME		= tavrasm.exe

### Language : US, DE #######################################################

LANGUAGE	= US
VERSION		= 119

### Compiler options #########################################################

CC		= gcc
CFLAGS          = -O2 -Wall -DAVRLANG=LANGUAGE_$(LANGUAGE)
CPPFLAGS	=
CCFLAGS         = $(CFLAGS) $(CPPFLAGS)
LINK            = -lm -lstdc++
OBJS		= avrparse.o avrlex.o avrasm.o symbol.o semantic.o utils.o

### Defaul CC files #########################################################

.cc.o:
		$(CC) -c $(CCFLAGS) $<

### Executable ##############################################################

$(EXENAME):	$(OBJS)
		$(CC) $(CCFLAGS) $(OBJS) $(LINK) -o $@

### Parser file #############################################################

avrparse.cc:	avrparse.y avrasm.hh symbol.hh semantic.hh opcodes.hh
		bison -d -o avrparse avrparse.y
		ren avrparse avrparse.cc
		ren avrparse.h avrparse.hh

### Scanner file ############################################################

avrlex.cc:	avrparse.cc avrlex.l symbol.hh semantic.hh avrparse.hh \
		opcodes.hh avrasm.hh messages.hh
		flex -o$@ avrlex.l

### Dependencies ############################################################

avrlex.o:	avrlex.l
avrparse.o:	avrparse.y
avrasm.o:	avrasm.cc avrasm.hh symbol.hh devices.hh messages.hh
symbol.o:	symbol.cc symbol.hh avrasm.hh
utils.o:	utils.cc utils.hh avrasm.hh messages.hh msg_us.hh msg_de.hh msg_sp.hh
semantic.o:	semantic.cc semantic.hh symbol.hh opcodes.hh avrasm.hh \
		messages.hh

### END OF FILE #############################################################




