Makes as.c windows-compatible.
This commit is contained in:
parent
2267d336d0
commit
7388ab262c
3 changed files with 15 additions and 12 deletions
|
@ -1,8 +1,3 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
all: as
|
||||
|
||||
as: as.c tokens.c ../mnemonics.c ../disassembler.c
|
||||
|
|
|
@ -1,17 +1,22 @@
|
|||
|
||||
#include "tokens.h"
|
||||
#include "../vm.h"
|
||||
#include "../mnemonics.h"
|
||||
#include "../disassembler.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "tokens.h"
|
||||
#include "../vm.h"
|
||||
#include "../mnemonics.h"
|
||||
#include "../disassembler.h"
|
||||
#if defined(_MSC_VER)
|
||||
#include "../getopt.h"
|
||||
#else
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
struct llist
|
||||
{
|
||||
|
@ -251,7 +256,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
listing = fopen(optarg, "w");
|
||||
if(listing == NULL) {
|
||||
fprintf(stderr, "Could not open %s.\n");
|
||||
fprintf(stderr, "Could not open %s.\n", optarg);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
@ -347,7 +352,7 @@ void apply_modifier(instruction_t *i, const char *mod)
|
|||
|
||||
if(strncmp("cmd:", mod, 4) == 0)
|
||||
{
|
||||
fprintf(stderr, "Command specification %s not supported yet.\n");
|
||||
fprintf(stderr, "Command specification %s not supported yet.\n", mod);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,9 @@ echo Building emulator...
|
|||
SET LIBS= /NXCOMPAT /DYNAMICBASE "SDL.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X64 /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /TLBID:1 /NODEFAULTLIB:msvcrt.lib
|
||||
cl %INIT% /I "SDL-1.2.15\include" emulator.c vm.c getopt.c %OPTIONS% /link %LIBS%
|
||||
|
||||
echo Building assembler...
|
||||
cl %INIT% /DYY_NO_UNISTD_H as\as.c as\tokens.c mnemonics.c disassembler.c getopt.c %OPTIONS%
|
||||
|
||||
echo Cleaning up...
|
||||
del *.obj
|
||||
SET PATH=%PATHSAVE%
|
||||
|
|
Loading…
Reference in a new issue