Small makefile improvements

This commit is contained in:
Daniel Loffgren 2017-03-05 19:12:35 -08:00
parent b9bad6641c
commit d6720550b5

View File

@ -1,20 +1,18 @@
PROG= apple1 PROG= apple1
SRCS= src/main.c src/pia.c v6502/v6502/log.c v6502/v6502/debugger.c v6502/v6502/breakpoint.c SRCS= src/main.c src/pia.c v6502/v6502/log.c v6502/v6502/debugger.c v6502/v6502/breakpoint.c
include v6502/libvars.mk
V6502_PREFIX= v6502 V6502_PREFIX= v6502
LIBV6502_DIR= $(V6502_PREFIX)/v6502 LIBV6502_DIR= $(V6502_PREFIX)/v6502
LIBV6502= $(LIBV6502_DIR)/libv6502.a
LIBAS6502_DIR= $(V6502_PREFIX)/as6502 LIBAS6502_DIR= $(V6502_PREFIX)/as6502
LIBAS6502= $(LIBAS6502_DIR)/libas6502.a
LIBDIS6502_DIR= $(V6502_PREFIX)/dis6502 LIBDIS6502_DIR= $(V6502_PREFIX)/dis6502
LIBDIS6502= $(LIBDIS6502_DIR)/libdis6502.a
AS= $(LIBAS6502_DIR)/as6502 AS= $(LIBAS6502_DIR)/as6502
ROM= apple1.rom ROM= apple1.rom
ROMSRC= src/wozmon.s ROMSRC= src/wozmon.s
CFLAGS+= -I$(V6502_PREFIX) -std=c99 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_GNU_SOURCE CFLAGS+= -I$(V6502_PREFIX) -std=c99 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_GNU_SOURCE
LDFLAGS+= -ledit -lcurses -ldis6502 -las6502 -lv6502 -L$(LIBV6502_DIR) -L$(LIBAS6502_DIR) -L $(LIBDIS6502_DIR) LDFLAGS= -ledit -lcurses -ldis6502 -las6502 -lv6502 -L$(LIBV6502_DIR) -L$(LIBAS6502_DIR) -L$(LIBDIS6502_DIR)
OBJS= $(SRCS:.c=.o) OBJS= $(SRCS:.c=.o)
all: $(PROG) $(ROM) all: $(PROG) $(ROM)