Ryukojiro-apple1/Makefile

28 lines
644 B
Makefile
Raw Normal View History

2017-03-05 19:15:45 -08: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-05 19:25:03 -08:00
V6502_PREFIX= v6502
2017-03-05 19:12:35 -08:00
include v6502/libvars.mk
2017-03-05 19:25:03 -08:00
AS= $(V6502_PREFIX)/as6502/as6502
2017-03-05 19:15:45 -08:00
ROM= apple1.rom
ROMSRC= src/wozmon.s
2017-03-05 19:15:45 -08:00
CFLAGS+= -I$(V6502_PREFIX) -std=c99 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_GNU_SOURCE
2017-03-05 19:25:03 -08: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-05 19:25:03 -08:00
$(MAKE) -C $(V6502_PREFIX)/as6502
2017-03-05 19:25:03 -08:00
clean:
rm -f $(PROG) $(ROM) $(OBJS)