#This controls the compilation of the Intel 8048 Assembler program
#
# $Log: Makefile,v $
# Revision 1.2  1997/06/13 08:42:50  david
# Fixed to compile on Linux (Unix)?
# Now requires the xasm-devel package.
#
# Revision 1.1  1997/06/04 02:59:13  david
# Initial revision
#
#

#Definitions
INCLUDES = /usr/include/xasm
CFLAGS = -O -I$(INCLUDES)
YFLAGS = -d
LIBS = /usr/lib/libxasm.a
YACC = bison

#How to compile the program
OBJS = model.o proper.o propery.o properl.o

xasm48 : $(OBJS) version.o
	$(CC) $(CFLAGS) $(OBJS) version.o $(LIBS) -o xasm48

xasm48.exe :
	$(MAKE) "CFLAGS=-DMSDOS -dos" xasm48
	mv xasm48 xasm48.exe

backup : clean
	cd ..; tar cvfz xasm48.tar.gz xasm48

clean :
	rm -f *.o properl.c propery.c propery.h xasm48

proper.o : $(INCLUDES)/xasm.h
properl.o : propery.h
propery.c propery.h : propery.y
	$(YACC) -d propery.y -o propery.c

propery.o : propery.c $(INCLUDES)/symbols.h

version.o : $(OBJS)
	echo "char *Version_Date = \"`date '+%D %T'`\";" > version.c
	$(CC) $(CFLAGS) -c version.c
	rm version.c
