News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Error in make.bat for masm32.lib

Started by Yuri, September 08, 2010, 09:13:58 AM

Previous topic - Next topic

Yuri

Line 9:

if errorlevel 0 goto okml


I think it should be:

if not errorlevel 1 goto okml


Otherwise it goes to okml in spite of errors.

zemtex

About make.bat. I have made a cmake.bat which stands for (C)reate Makefile. It will create a makefile for your project.
Usage: cmake [ProgramName]
Leave out the squarebrackets and leave out the file extension (.asm)

Copy and paste this script into cmake.bat and save it in your masm32\bin folder.

============= CUT FROM HERE ====================================

@echo off

:: BEWARE: Change variable "masmdir" below this comment to the proper masm32 path.
:: DO NOT put backslash on the far end of the path.
:: This is legal: c:\masm32
:: This is NOT:   c:\masm32\

:: ==================
set masmdir=c:\masm32
:: ==================


if "%1" == "" goto Usage
if NOT EXIST %1%.asm goto Error1
FOR /F "tokens=*" %%i in ('DIR %1.asm /B') do SET Filnavn=%%i
set Filnavn=%Filnavn:.asm=%
echo NAME=%Filnavn%>MAKEFILE
echo $(NAME).exe: $(NAME).obj>>MAKEFILE
echo         %masmdir%\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:%masmdir%\lib $(NAME).obj>>MAKEFILE
echo $(NAME).obj: $(NAME).asm>>MAKEFILE
echo         %masmdir%\bin\ml /c /coff /Cp $(NAME).asm>>MAKEFILE
echo Completed.
echo Type NMAKE to make your project.
goto Bye
:Error1
echo Error! Could not find %1%.asm
goto Bye
:Usage
echo Error! Usage:  CMAKE ProgramName
:Bye

============= END OF CUT ====================================
I have been puzzling with lego bricks all my life. I know how to do this. When Peter, at age 6 is competing with me, I find it extremely neccessary to show him that I can puzzle bricks better than him, because he is so damn talented that all that is called rational has gone haywire.