Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add native win32 build #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@echo off
setlocal EnableDelayedExpansion

if "where /q cl.exe" neq 0 (
set __VSCMD_ARG_NO_LOGO=1
for /f "tokens=*" %%i in ('"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath') do set VS=%%i
if "!VS!" equ "" (
echo ERROR: Visual Studio installation not found
exit /b 1
)
call "!VS!\VC\Auxiliary\Build\vcvarsall.bat" amd64 || exit /b 1
)

set SRCS=src/args.c ^
src/avra.c ^
src/coff.c ^
src/device.c ^
src/directiv.c ^
src/expr.c ^
src/file.c ^
src/macro.c ^
src/map.c ^
src/mnemonic.c ^
src/parser.c ^
src/stdextra.c

call cl /O2 /MT /nologo %SRCS% /link /out:avra.exe
del *.obj
4 changes: 3 additions & 1 deletion src/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>

#ifndef _MSC_VER
#include <unistd.h>
#endif

#include "misc.h"
#include "avra.h"
Expand Down