2017-03-06 03:15:45 +00:00
|
|
|
PROG= apple1
|
|
|
|
SRCS= src/main.c src/pia.c v6502/v6502/log.c v6502/v6502/debugger.c v6502/v6502/breakpoint.c
|
|
|
|
OBJS= $(SRCS:.c=.o)
|
2015-09-15 03:05:14 +00:00
|
|
|
|
2017-03-06 03:25:03 +00:00
|
|
|
V6502_PREFIX= v6502
|
2017-03-06 03:12:35 +00:00
|
|
|
include v6502/libvars.mk
|
2015-09-15 03:05:14 +00:00
|
|
|
|
2017-03-06 03:25:03 +00:00
|
|
|
AS= $(V6502_PREFIX)/as6502/as6502
|
2017-03-06 03:15:45 +00:00
|
|
|
ROM= apple1.rom
|
2016-04-10 00:25:57 +00:00
|
|
|
ROMSRC= src/wozmon.s
|
2015-09-21 05:01:17 +00:00
|
|
|
|
2017-03-06 03:15:45 +00:00
|
|
|
CFLAGS+= -I$(V6502_PREFIX) -std=c99 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_GNU_SOURCE
|
2017-03-06 03:25:03 +00:00
|
|
|
LDFLAGS+= -ledit -lcurses -ldis6502 -las6502 -lv6502
|
2015-09-15 03:05:14 +00:00
|
|
|
|
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):
|
2017-03-06 03:25:03 +00:00
|
|
|
$(MAKE) -C $(V6502_PREFIX)/as6502
|
2015-09-21 05:12:53 +00:00
|
|
|
|
2017-03-06 03:25:03 +00:00
|
|
|
clean:
|
2015-09-21 05:08:13 +00:00
|
|
|
rm -f $(PROG) $(ROM) $(OBJS)
|
2017-03-06 03:29:26 +00:00
|
|
|
make -C $(V6502_PREFIX) clean
|
|
|
|
|
|
|
|
include v6502/libtargets.mk
|