程式語言 - Netwide Assembler (NASM) - Win32 API (NASMX) - Makefile



export WINEPREFIX=/home/user/.wine_x86

TARGET=main
MYWINE=box86 wine
NASM32=/home/user/.wine_x86/drive_c/nasmx

all:
	${MYWINE} ${NASM32}/bin/nasm.exe -fwin32 ${TARGET}.asm
	${MYWINE} ${NASM32}/bin/GoLink.exe /entry _main ${TARGET}.obj kernel32.dll user32.dll gdi32.dll msvcrt.dll /mix

run:
	${MYWINE} ${TARGET}.exe

clean:
	rm -rf ${TARGET}.exe ${TARGET}.obj