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



export WINEPREFIX=/home/user/.wine_x86

TARGET=main
MYWINE=box86 wine
NASM32=/home/user/.wine_x86/drive_c/nasm
MASM32=/home/user/.wine_x86/drive_c/masm32

all:
	${MYWINE} ${NASM32}/bin/nasm.exe -fwin32 ${TARGET}.asm
	${MYWINE} ${MASM32}/bin/link.exe /SUBSYSTEM:WINDOWS /MERGE:.rdata=.text ${TARGET}.obj

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

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