Could someone help change mine makefiles to assemble files if .inc files change.
Current makefile:
My projects have directory structures like this:
Every .asm file have corresponding .inc file.
Thanks.
Current makefile:
EXE = test.exe
PATH = c:\masm32\bin
INCLUDE = .\include
LIB = c:\masm32\lib
O = Bin
S = Source
I = Include
Objs = $O/OGLEng.obj $O/Console.obj $O/LList.obj $O/Memory.obj $O/Test.obj $O/Textures.obj
AFLAGS = /nologo /c /coff /Cp /Cx /I\masm32\include
LFLAGS = /SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0 /NOLOGO
$O\$(EXE) : $(Objs)
link $(LFLAGS) $** /OUT:$@
{$S}.asm{$O}.obj:
ml /Fo$@ $(AFLAGS) $<
My projects have directory structures like this:
ProjDir makefile, RadAsm project file
Bin Final exe, objs
Data Pics, etc.
Source *.asm
Include *.inc
Resource *.rc
Every .asm file have corresponding .inc file.
Thanks.
{$S}.asm{$O}.obj: [b]$(?).asm $(?).inc[/b]
ml /Fo$@ $(AFLAGS) $<
I don't have the manual here, but I know the dependancies go after the colon - I just forget what should go there to specify the file names. (No help at all. :grin: )Thanks, but M$ says:
{frompath}.fromext{topath}.toext:
commands
Any more ideas?
{$I}.inc{$O}.obj:
ml /Fo$@ $(AFLAGS) $<
Would work if I could rip off path and extension from file name($<) and replase them with Source\filename.asm
Refine broblem:
$< changes to Include\filename.inc but how to get it like this: Source\filename.asm
{frompath}.fromext{topath}.toext:
commands
Any more ideas?
{$I}.inc{$O}.obj:
ml /Fo$@ $(AFLAGS) $<
Would work if I could rip off path and extension from file name($<) and replase them with Source\filename.asm
Refine broblem:
$< changes to Include\filename.inc but how to get it like this: Source\filename.asm
I normally create simple make files this way:
# generic commands
.asm.obj:
...commands...
# no commands means use the generic .asm.obj commands
x.obj: file1.inc file2.inc ...other files used by x.asm...