as09: build on 6502
authorAlan Cox <alan@linux.intel.com>
Wed, 22 Nov 2017 17:55:02 +0000 (17:55 +0000)
committerAlan Cox <alan@linux.intel.com>
Wed, 22 Nov 2017 17:55:02 +0000 (17:55 +0000)
Applications/as09/Makefile.6502 [new file with mode: 0644]
Applications/as09/as.c
Applications/as09/proto.h

diff --git a/Applications/as09/Makefile.6502 b/Applications/as09/Makefile.6502
new file mode 100644 (file)
index 0000000..54e6f9d
--- /dev/null
@@ -0,0 +1,42 @@
+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
+
+SRC =  as.c assemble.c errors.c express.c \
+       genbin.c genlist.c genobj.c gensym.c \
+       keywords.c macro.c mops.c pops.c readsrc.c \
+       scan.c table.c typeconv.c alloc.c
+OBJ = $(SRC:.c=.o)
+
+all: as09
+
+as09: $(OBJ)
+       $(LINKER) -o $@ $(LINKER_OPT) $(CRT0) $^ c6502.lib -m $@.map
+
+clean realclean clobber:
+       rm -f *.o as09 *~
+
+as.o: const.h type.h byteord.h macro.h file.h flag.h globvar.h
+assemble.o: const.h type.h address.h globvar.h opcode.h scan.h
+error.o: const.h type.h
+express.o: const.h type.h address.h globvar.h scan.h source.h
+genbin.o: const.h type.h address.h file.h globvar.h
+genlist.o: const.h type.h address.h flag.h file.h globvar.h macro.h scan.h \
+          source.h
+genobj.o: const.h type.h address.h file.h globvar.h
+gensym.o: const.h type.h flag.h file.h globvar.h
+keywords.o: const.h type.h globvar.h opcode.h
+macro.o: const.h type.h globvar.h scan.h macro.h
+mops.o: const.h type.h globvar.h opcode.h scan.h address.h
+pops.o: const.h type.h address.h flag.h globvar.h opcode.h scan.h
+readsrc.o: const.h type.h flag.h file.h globvar.h macro.h scan.h source.h
+scan.o: const.h type.h globvar.h scan.h 
+table.o: const.h type.h globvar.h opcode.h scan.h
index aa3f81e..9d2bdcd 100644 (file)
@@ -32,7 +32,7 @@ static int keep_bad_output = 0;
 
 static void initp1(void);
 static int my_creat(char *name, char *message);
-static void process_args(int argc, char **argv);
+static void process_args(int argc, char *argv[]);
 static void summary(fd_t fd);
 static void summ_number(unsigned num);
 static void usage(void);
index 3878633..4473b2a 100644 (file)
@@ -1,7 +1,7 @@
 /* extern functions */
 
 /* as.c */
-int main(int argc, char **argv);
+int main(int argc, char *argv[]);
 void as_abort(char *message);
 void finishup(void);
 void initp1p2(void);