--- /dev/null
+PLATFORM = 6502
+CC = cl65
+ASM = ca65
+LINKER = cl65
+CFLAGS = -t none -O -D__STDC__ -c -O -I../../../Library/include -I../../../Library/include/6502
+LINKER_OPT = -L../../../Library/libs -C ../../../Library/libs/ld65-$(TARGET).cfg
+ASM_OPT = -o
+CRT0 = ../../../Library/libs/crt0_6502.o
+CRT0NS = ../../../Library/libs/crt0nostdio_6502.o
+
+.SUFFIXES: .c .o
+
+SRCS = ac.c accton.c at.c atrun.c col.c comm.c cron.c crypt.c dc.c dd.c \
+ deroff.c diff3.c diff.c diffh.c join.c look.c makekey.c mesg.c \
+ newgrp.c pr.c ptx.c rev.c split.c su.c sum.c test.c time.c tsort.c \
+ wall.c
+
+SRCSNS = ed.c
+
+SRCSTC = clear.c
+
+SRCSBAD =
+
+OBJS = $(SRCS:.c=.o)
+OBJSNS = $(SRCSNS:.c=.o)
+OBJSTC = $(SRCSTC:.c=.o)
+OBJSBAD = $(SRCSBAD:.c=.o)
+
+APPSNS = $(OBJSNS:.o=)
+
+APPSTC = $(OBJSTC:.o=)
+
+APPS = $(OBJS:.o=) $(OBJSBAD:.o=) $(OBJSNS:.o=) $(OBJSTC:.o=)
+
+all: $(APPS) sizes
+
+
+$(APPSNS): OPTS =
+
+$(APPSTC): OPTS =
+
+$(OBJS): %.o: %.c
+
+$(OBJSNS): %.o: %.c
+
+$(OBJSTC): %.o: %.c
+
+$(OBJSBAD): %.o: %.c
+
+%: %.o
+ $(LINKER) -o $@ $(LINKER_OPT) $(CRT0) $^ c6502.lib -m $@.map
+
+sizes: $(APPS)
+ ls -l $(APPS) >size.report
+
+clean:
+ rm -f $(OBJS) $(OBJSNS) $(OBJSBAD) $(APPS) $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin size.report *.o
+
+rmbak:
+ rm -f *~ core
+