Welcome to Emulationworld

Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext ThreadShow in Flat Mode*

SubjectMakefiles Reply to this message
Posted byfinaldave
Posted on04/14/04 06:56 AM

Hi guys, I have a Makefile which looks like this, but at he moment it chucks all the .objs and .pchs into the same directory as the source files.

I'm not that good with nmake Makefile syntax, do you know how (like the Vis Studio IDE does) you can get it to put the .objs into a subdirectory like say Debug/Direct.obj or Release/Direct.obj or XBox/Direct.obj to save cluttering up the source directory?

Cheers in advance...

CPP =d:\xdk\xbox\bin\vc71\cl.exe

CFLAGS=/nologo /D_XBOX /I. /Id:\xdk\xbox\include /W4 /Ox /MT /YX
LFLAGS= /libpath:d:\xdk\xbox\lib /subsystem:xbox /map

OBJS=DSound.obj Emu.obj Input.obj LightCal.obj Loop.obj Main.obj Rom.obj \
Direct.obj FileMenu.obj Font.obj TexScreen.obj \
Unzip.obj zlib.lib \

LIBS=d3d8.lib d3dx8.lib xapilib.lib xboxkrnl.lib xgraphics.lib dsound.lib

all : default.xbe

# Convert .exe to XBox .xbe:
default.xbe : default.exe
$(IMAGEBLD) default.exe /out:default.xbe
del default.exe
del *.map
xbcp /y /t default.xbe xe:\DegaBox\DegaBox.xbe

# Link into .exe:
default.exe : $(OBJS)
$(LINK) $(LFLAGS) /out:default.exe $(OBJS) $(LIBS)

# Compile .cpp files:
@$(CPP) $(CFLAGS) /c $*.cpp

CLEANUP=*.xbe default.exe *.map *.obj *.pch
clean :
for %i in ( $(CLEANUP) ) do if exist %i del %i

You learn something old everyday...

Entire Thread
Subject  Posted byPosted On
.Makefiles  finaldave04/14/04 06:56 AM
.*Re: Makefiles  smf04/15/04 02:58 AM