mirror of
https://github.com/rkujawa/rk65c02.git
synced 2024-12-13 16:30:01 +00:00
Adjust build process and instruction-related funcs.
Due to new dynamically build 65c02isa.h header.
This commit is contained in:
parent
611f51201f
commit
bd0eeea144
11
src/Makefile
11
src/Makefile
@ -1,9 +1,11 @@
|
|||||||
OBJS=rk65c02.o bus.o instruction.o 65c02isa.o
|
OBJS=rk65c02.o bus.o instruction.o
|
||||||
LIB_SO=librk65c02.so
|
LIB_SO=librk65c02.so
|
||||||
LIB_STATIC=librk65c02.a
|
LIB_STATIC=librk65c02.a
|
||||||
LDFLAGS=-shared
|
LDFLAGS=-shared
|
||||||
CFLAGS=-Wall -fpic
|
CFLAGS=-Wall -fpic
|
||||||
|
|
||||||
|
65C02ISA=65c02isa
|
||||||
|
|
||||||
all : $(LIB_SO) $(LIB_STATIC)
|
all : $(LIB_SO) $(LIB_STATIC)
|
||||||
|
|
||||||
$(LIB_SO) : $(OBJS)
|
$(LIB_SO) : $(OBJS)
|
||||||
@ -12,10 +14,15 @@ $(LIB_SO) : $(OBJS)
|
|||||||
$(LIB_STATIC) : $(OBJS)
|
$(LIB_STATIC) : $(OBJS)
|
||||||
$(AR) rcs $(LIB_STATIC) $(OBJS)
|
$(AR) rcs $(LIB_STATIC) $(OBJS)
|
||||||
|
|
||||||
%.o : %.c %.h
|
$(65C02ISA).h : $(65C02ISA).csv $(65C02ISA).awk
|
||||||
|
awk -f $(65C02ISA).awk $(65C02ISA).csv > $(65C02ISA).h
|
||||||
|
|
||||||
|
# XXX: dependency on 65c02isa.h is only for instruction.c
|
||||||
|
%.o : %.c %.h $(65C02ISA).h
|
||||||
$(CC) $(CFLAGS) -c $<
|
$(CC) $(CFLAGS) -c $<
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
|
rm -f $(65C02ISA).h
|
||||||
rm -f $(OBJS)
|
rm -f $(OBJS)
|
||||||
rm -f $(LIB_SO) $(LIB_STATIC)
|
rm -f $(LIB_SO) $(LIB_STATIC)
|
||||||
|
|
||||||
|
@ -114,3 +114,13 @@ disassemble(bus_t *b, uint16_t addr)
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
instrdef_t
|
||||||
|
instrdef_get(uint8_t opcode)
|
||||||
|
{
|
||||||
|
instrdef_t id;
|
||||||
|
|
||||||
|
id = instrs[opcode];
|
||||||
|
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -39,5 +39,6 @@ typedef struct instruction instruction_t;
|
|||||||
instruction_t instruction_fetch(bus_t *, uint16_t);
|
instruction_t instruction_fetch(bus_t *, uint16_t);
|
||||||
void instruction_print(instruction_t *);
|
void instruction_print(instruction_t *);
|
||||||
void disassemble(bus_t *, uint16_t);
|
void disassemble(bus_t *, uint16_t);
|
||||||
|
instrdef_t instrdef_get(uint8_t);
|
||||||
|
|
||||||
#endif /* _INSTRUCTION_H_ */
|
#endif /* _INSTRUCTION_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user