From: Graeme Hinchliffe Date: Sun, 1 Jan 2012 18:05:45 +0000 (+0000) Subject: Created a quick and dirty windows based makefile. X-Git-Tag: 1.3.0~42 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=commitdiff_plain;h=4c9357ac95af4a645d42640d2bcae39cda56b581 Created a quick and dirty windows based makefile. Corrected definitions of BYTE, WORD and LONG to appropriate uintN_t values.. (it's warning like a mofo at the moment but tested and it assembled happily enough 68K and RISC) --- diff --git a/68kmn b/68kmn index e82767a..1c7bcb4 100644 --- a/68kmn +++ b/68kmn @@ -1,132 +1,132 @@ -abcd 1001 -add 1003 -adda 1005 -addi 1006 -addq 1007 -addx 1008 -and 1010 -andi 1012 -asl 1015 -asr 1019 -bcc 1023 -bhs 1023 -bcs 1024 -blo 1024 -beq 1025 -bze 1025 -bz 1025 -bge 1026 -bgt 1027 -bhi 1028 -ble 1029 -bls 1030 -blt 1031 -bmi 1032 -bne 1033 -bnz 1033 -bpl 1034 -bvc 1035 -bvs 1036 -bchg 1037 -bclr 1041 -bra 1045 -bt 1045 -bset 1046 -bsr 1050 -btst 1051 -chk 1055 -clr 1056 -cmp 1058 -cmpa 1060 -cmpi 1061 -cmpm 1062 -dbcc 1063 -dbcs 1064 -dblo 1064 -dbeq 1065 -dbze 1065 -dbf 1066 -dbra 1066 -dbge 1067 -dbgt 1068 -dbhi 1069 -dbhs 1069 -dble 1070 -dbls 1071 -dblt 1072 -dbmi 1073 -dbne 1074 -dbnz 1074 -dbpl 1075 -dbt 1076 -dbvc 1077 -dbvs 1078 -divs 1079 -divu 1080 -eor 1081 -eori 1082 -exg 1085 -ext 1086 -illegal 1088 -jmp 1089 -jsr 1090 -lea 1091 -link 1092 -lsl 1093 -lsr 1097 -move 1101 -movea 1108 -movem 1109 -movep 1110 -moveq 1112 -muls 1113 -mulu 1114 -nbcd 1115 -neg 1116 -negx 1117 -nop 1118 -not 1119 -or 1120 -ori 1122 -pea 1125 -reset 1126 -rol 1127 -ror 1131 -roxl 1135 -roxr 1139 -rte 1143 -rtr 1144 -rts 1145 -sbcd 1146 -scc 1148 -shs 1148 -scs 1149 -slo 1149 -seq 1150 -sze 1150 -sf 1151 -sge 1152 -sgt 1153 -shi 1154 -sle 1155 -sls 1156 -slt 1157 -smi 1158 -sne 1159 -snz 1159 -spl 1160 -st 1161 -svc 1162 -svs 1163 -stop 1164 -sub 1165 -suba 1167 -subi 1168 -subq 1169 -subx 1170 -swap 1172 -tas 1173 -trap 1174 -trapv 1175 -tst 1176 -unlk 1177 +abcd 1001 +add 1003 +adda 1005 +addi 1006 +addq 1007 +addx 1008 +and 1010 +andi 1012 +asl 1015 +asr 1019 +bcc 1023 +bhs 1023 +bcs 1024 +blo 1024 +beq 1025 +bze 1025 +bz 1025 +bge 1026 +bgt 1027 +bhi 1028 +ble 1029 +bls 1030 +blt 1031 +bmi 1032 +bne 1033 +bnz 1033 +bpl 1034 +bvc 1035 +bvs 1036 +bchg 1037 +bclr 1041 +bra 1045 +bt 1045 +bset 1046 +bsr 1050 +btst 1051 +chk 1055 +clr 1056 +cmp 1058 +cmpa 1060 +cmpi 1061 +cmpm 1062 +dbcc 1063 +dbcs 1064 +dblo 1064 +dbeq 1065 +dbze 1065 +dbf 1066 +dbra 1066 +dbge 1067 +dbgt 1068 +dbhi 1069 +dbhs 1069 +dble 1070 +dbls 1071 +dblt 1072 +dbmi 1073 +dbne 1074 +dbnz 1074 +dbpl 1075 +dbt 1076 +dbvc 1077 +dbvs 1078 +divs 1079 +divu 1080 +eor 1081 +eori 1082 +exg 1085 +ext 1086 +illegal 1088 +jmp 1089 +jsr 1090 +lea 1091 +link 1092 +lsl 1093 +lsr 1097 +move 1101 +movea 1108 +movem 1109 +movep 1110 +moveq 1112 +muls 1113 +mulu 1114 +nbcd 1115 +neg 1116 +negx 1117 +nop 1118 +not 1119 +or 1120 +ori 1122 +pea 1125 +reset 1126 +rol 1127 +ror 1131 +roxl 1135 +roxr 1139 +rte 1143 +rtr 1144 +rts 1145 +sbcd 1146 +scc 1148 +shs 1148 +scs 1149 +slo 1149 +seq 1150 +sze 1150 +sf 1151 +sge 1152 +sgt 1153 +shi 1154 +sle 1155 +sls 1156 +slt 1157 +smi 1158 +sne 1159 +snz 1159 +spl 1160 +st 1161 +svc 1162 +svs 1163 +stop 1164 +sub 1165 +suba 1167 +subi 1168 +subq 1169 +subx 1170 +swap 1172 +tas 1173 +trap 1174 +trapv 1175 +tst 1176 +unlk 1177 diff --git a/makefile.win b/makefile.win new file mode 100644 index 0000000..3ee042c --- /dev/null +++ b/makefile.win @@ -0,0 +1,125 @@ +# +# RMAC - Reboot's Macro Assembler for the Atari Jaguar +# Copyright (C) 199x Landon Dyer, 2011-2012 Reboot & Friends +# MAKEFILE for Windows Compilation +# Currently tested against Windows 7 (64bit) using mingw32-gcc compiler +# + +# Windows specific makefile +# need to define environment variable CC to point to your compiler or set it here + +#CC = cc + +rm = del + +CFLAGS = -g -Wall + +#CFLAGS = -g -D__GCCUNIX__ -I + +SRCS = amode.c debug.c direct.c eagen.c error.c expr.c listing.c mach.c macro.c mark.c object.c procln.c risca.c rmac.c sect.c symbol.c token.c + +OBJS = amode.o debug.o direct.o eagen.o error.o expr.o listing.o mach.o macro.o mark.o object.o procln.o risca.o rmac.o sect.o symbol.o token.o + +# +# Build everything +# + +all : mntab.h 68ktab.h kwtab.h risckw.h rmac + +# +# Generated Sources for State Machines and Keyword, Directive and Mnemonic Definitions +# + +mntab.h : mntab 68kmn kwgen.exe + type mntab 68kmn | kwgen mn >mntab.h + +68ktab.h 68kmn : 68ktab 68ktab 68kgen.exe + 68kgen 68kmn <68ktab >68ktab.h + +kwtab.h : kwtab kwgen.exe + kwgen kw kwtab.h + +risckw.h : kwtab kwgen.exe + kwgen mr risckw.h + +# +# Build Tools +# + +kwgen.exe : kwgen.c + $(CC) $(CFLAGS) -c kwgen.c -o kwgen + +kwgen : kwgen.o + $(CC) $(CFLAGS) -o kwgen kwgen.o + +68kgen.exe : 68kgen.c + $(CC) $(CFLAGS) -c 68kgen.c + +#68kgen.exe : 68kgen.o +# $(CC) $(CFLAGS) -o 68kgen 68kgen.o + +# +# Build RMAC Executable +# + +amode.o : amode.c + $(CC) $(CFLAGS) -c amode.c + +debug.o : debug.c + $(CC) $(CFLAGS) -c debug.c + +direct.o : direct.c + $(CC) $(CFLAGS) -c direct.c + +eagen.o : eagen.c + $(CC) $(CFLAGS) -c eagen.c + +error.o : error.c + $(CC) $(CFLAGS) -c error.c + +expr.o : expr.c + $(CC) $(CFLAGS) -c expr.c + +listing.o : listing.c + $(CC) $(CFLAGS) -c listing.c + +mach.o : mach.c + $(CC) $(CFLAGS) -c mach.c + +macro.o : macro.c + $(CC) $(CFLAGS) -c macro.c + +mark.o : mark.c + $(CC) $(CFLAGS) -c mark.c + +object.o : object.c + $(CC) $(CFLAGS) -c object.c + +procln.o : procln.c + $(CC) $(CFLAGS) -c procln.c + +risca.o : risca.c + $(CC) $(CFLAGS) -c risca.c + +rmac.o : rmac.c + $(CC) $(CFLAGS) -c rmac.c + +sect.o : sect.c + $(CC) $(CFLAGS) -c sect.c + +symbol.o : symbol.c + $(CC) $(CFLAGS) -c symbol.c + +token.o : token.c + $(CC) $(CFLAGS) -c token.c + +rmac : $(OBJS) + $(CC) $(CFLAGS) -o rmac $(OBJS) + +# +# Clean Build Environment +# + +clean: + $(rm) $(OBJS) kwgen.o 68kgen.o rmac kwgen 68kgen kwtab.h 68ktab.h mntab.h risckw.h + diff --git a/rmac.h b/rmac.h index 58fba8d..9afb0e4 100644 --- a/rmac.h +++ b/rmac.h @@ -60,11 +60,11 @@ #endif #endif +#include - -#define BYTE unsigned char -#define WORD unsigned short -#define LONG unsigned long +#define BYTE uint8_t +#define WORD uint16_t +#define LONG uint32_t #define VOID void #define ERROR (-1) // Generic error return