From 67467a0839035e7ae085a15f0b5d018439529e4a Mon Sep 17 00:00:00 2001 From: Daniel Loffgren Date: Tue, 15 Sep 2015 03:05:14 +0000 Subject: [PATCH] Initial makefile that can build the a1 binary git-svn-id: svn+ssh://svn.phoenixbox.net/svn/apple1/trunk@20 64f78de7-aa59-e511-a0e8-0002a5492df0 --- Makefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d021427 --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +PROG= a1 +SRCS= apple1/main.c apple1/pia.c + +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 + +CFLAGS+= -I$(V6502_PREFIX) +LDFLAGS+= -lcurses -ldis6502 -las6502 -lv6502 -L$(LIBV6502_DIR) -L$(LIBAS6502_DIR) -L $(LIBDIS6502_DIR) +OBJS= $(SRCS:.c=.o) + +all: $(PROG) + +$(PROG): $(LIBV6502) $(LIBAS6502) $(LIBDIS6502) $(OBJS) + $(CC) $(OBJS) -o $(PROG) $(LDFLAGS) + +$(LIBV6502): + $(MAKE) -C $(LIBV6502_DIR) lib + +$(LIBAS6502): + $(MAKE) -C $(LIBAS6502_DIR) lib + +$(LIBDIS6502): + $(MAKE) -C $(LIBDIS6502_DIR) lib + +cleanlib: + rm -f $(LIBV6502) $(LIBV6502_OBJS) + +clean: cleanlib + rm -f $(PROG) $(OBJS) +