2015-09-15 03:05:14 +00:00
|
|
|
PROG= a1
|
2015-09-18 18:21:33 +00:00
|
|
|
SRCS= apple1/main.c apple1/pia.c v6502/v6502/log.c v6502/v6502/debugger.c v6502/v6502/breakpoint.c
|
2015-09-15 03:05:14 +00:00
|
|
|
|
|
|
|
V6502_PREFIX= v6502
|
|
|
|
LIBV6502_DIR= $(V6502_PREFIX)/v6502
|
|
|
|
LIBV6502= $(LIBV6502_DIR)/libv6502.a
|
|
|
|
LIBAS6502_DIR= $(V6502_PREFIX)/as6502
|
|
|
|
LIBAS6502= $(LIBAS6502_DIR)/libas6502.a
|
|
|
|
LIBDIS6502_DIR= $(V6502_PREFIX)/dis6502
|
|
|
|
LIBDIS6502= $(LIBDIS6502_DIR)/libdis6502.a
|
|
|
|
|
2015-09-21 05:01:17 +00:00
|
|
|
AS= $(LIBAS6502_DIR)/as6502
|
|
|
|
ROM= apple1.rom
|
|
|
|
ROMSRC= apple1/wozmon.s
|
|
|
|
|
2015-09-18 08:48:43 +00:00
|
|
|
CFLAGS+= -I$(V6502_PREFIX) -std=c99
|
2015-09-18 18:21:33 +00:00
|
|
|
LDFLAGS+= -ledit -lcurses -ldis6502 -las6502 -lv6502 -L$(LIBV6502_DIR) -L$(LIBAS6502_DIR) -L $(LIBDIS6502_DIR)
|
2015-09-15 03:05:14 +00:00
|
|
|
OBJS= $(SRCS:.c=.o)
|
|
|
|
|
2015-09-21 05:01:17 +00:00
|
|
|
all: $(PROG) $(ROM)
|
|
|
|
|
|
|
|
$(ROM): $(ROMSRC) $(AS)
|
|
|
|
$(AS) -o $(ROM) $(ROMSRC)
|
2015-09-15 03:05:14 +00:00
|
|
|
|
|
|
|
$(PROG): $(LIBV6502) $(LIBAS6502) $(LIBDIS6502) $(OBJS)
|
|
|
|
$(CC) $(OBJS) -o $(PROG) $(LDFLAGS)
|
|
|
|
|
2015-09-21 05:12:53 +00:00
|
|
|
$(AS):
|
|
|
|
$(MAKE) -C $(LIBAS6502_DIR)
|
|
|
|
|
2015-09-15 03:05:14 +00:00
|
|
|
$(LIBV6502):
|
|
|
|
$(MAKE) -C $(LIBV6502_DIR) lib
|
|
|
|
|
|
|
|
$(LIBAS6502):
|
|
|
|
$(MAKE) -C $(LIBAS6502_DIR) lib
|
|
|
|
|
|
|
|
$(LIBDIS6502):
|
|
|
|
$(MAKE) -C $(LIBDIS6502_DIR) lib
|
|
|
|
|
|
|
|
cleanlib:
|
2015-09-21 05:12:53 +00:00
|
|
|
$(MAKE) -C $(V6502_PREFIX) clean
|
2015-09-15 03:05:14 +00:00
|
|
|
|
|
|
|
clean: cleanlib
|
2015-09-21 05:08:13 +00:00
|
|
|
rm -f $(PROG) $(ROM) $(OBJS)
|
2015-09-15 03:05:14 +00:00
|
|
|
|