Ryukojiro-apple1/Makefile

31 lines
704 B
Makefile
Raw Permalink Normal View History

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)
2017-03-06 03:25:03 +00:00
V6502_PREFIX= v6502
2017-03-06 03:12:35 +00:00
include v6502/libvars.mk
2017-03-06 03:25:03 +00:00
AS= $(V6502_PREFIX)/as6502/as6502
2017-03-06 03:15:45 +00:00
ROM= apple1.rom
ROMSRC= src/wozmon.s
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
all: $(PROG) $(ROM)
$(ROM): $(ROMSRC) $(AS)
$(AS) -o $(ROM) $(ROMSRC)
$(PROG): $(LIBV6502) $(LIBAS6502) $(LIBDIS6502) $(OBJS)
$(CC) $(OBJS) -o $(PROG) $(LDFLAGS)
$(AS):
2017-03-06 03:25:03 +00:00
$(MAKE) -C $(V6502_PREFIX)/as6502
2017-03-06 03:25:03 +00:00
clean:
rm -f $(PROG) $(ROM) $(OBJS)
2017-03-06 03:29:26 +00:00
make -C $(V6502_PREFIX) clean
include v6502/libtargets.mk