#
# Makefile for the 8051 simulator (simulate instructions sources)
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
CFLAGS= -I../include $(SIM8051FLAGS) 

.c.s:
	$(CC) $(CFLAGS) -S $<
.c.o:
	$(CC) $(CFLAGS) -c $<
.s.o:
	$(AS) -o $*.o $<

OBJS=	memory.o branch.o arithm.o logic.o bool.o data_trans.o \
	interrupt.o serial.o timer.o util.o

sim:	$(OBJS)

dep:
	$(CPP) $(CFLAGS) -M *.c > .depend

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif

clean: 
	/bin/rm -f $(OBJS)
