# Added makefile for those of us on unix boxen

# Compiler options
# 
# The -D for the architecture type is MACHTEN in this default case
# (a PPC little-endian system using BSD 4.4 runtime).  Set this to
# match your system, based on the supported values in arch.h.  You
# will probably find that most systems will work with some combination
# of the existing build types (i.e. FREEBSD probably works with LINUX86,
# etc.)
#

CC=gcc
CFLAGS=-DMACHTEN  -O3 


INCLUDES=	-I../headers

# removed dummy_profiler.o 

OBJS= asm.o asm_label.o asm_opcode.o asm_operand.o asm_pseudo.o \
	asm_register.o asm_symbols.o asm_value.o console.o console_clear.o \
	console_disasm.o console_dispatch.o console_exam.o console_exec.o \
	console_include.o console_init.o console_load.o console_print.o \
	console_quit.o console_save.o console_set.o console_show.o \
	console_step.o console_test.o console_time.o console_vminit.o \
	console_zero.o decode_opcode.o decode_operand.o \
    disasm_operand.o driver.o \
	emul_ash.o emul_bitfield.o emul_branch.o emul_crc.o \
	emul_call.o emul_clr.o emul_cmp.o emul_cmpc.o emul_extended.o \
	emul_float_math.o emul_increment.o emul_integer_cvt.o \
	emul_integer_math.o emul_interlock.o emul_locc.o emul_loop.o \
    emul_matchc.o \
	emul_misc.o emul_mov.o emul_mova.o emul_movc.o emul_procreg.o \
	emul_push.o emul_skpc.o emul_xfc.o errors.o fpu.o help.o \
	init_emulators.o init_symbols.o initialization.o interrupt.o \
	parse.o registers.o save_binary.o storage.o vax.o vm.o asm_expr.o \
    shim.o  console_run.o memory_io.o \
    librtl_file.o librtl_input.o librtl_print.o librtl_math.o \
    librtl_strings.o librtl_utils.o service.o p1_vector.o \
    dclrtl.o librtl_memory.o librtl_time.o 


all: evax

evax: $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o ../evax


clean:
	rm *.o 
	rm ../evax

.c.o:
	$(CC) $(INCLUDES) -c $(CFLAGS) $*.c -o $@

