Article View: comp.windows.ms.programmer
Article #1513Save time compiling-here's how!
From: David T Mitchell III
Date: Tue, 05 Mar 1991 20:57
Date: Tue, 05 Mar 1991 20:57
42 lines
1735 bytes
1735 bytes
Keywords:
Here's something that might save you some time. You're probably linking more
than necessary if you are using a standard make file.
Here's a standard make file setup, similar to the ones generated by MS's PWB,
Borland C++, and even found in Petzold:
myprog.exe: a1.obj a2.obj myprog.def myprog.res
link {blah, blah}
rc myprog.res
Very often you just change the resource file (after modifying a dialog
template, menu, etc) and want to recompile. The problem is that changing
the resource file causes the object files to be UNNECESSARILY re-linked.
That takes time, especially if you've got a bunch of them.
SOLUTION:
Change your makefile to split the task of linking and resource compiling.
myprog.XXX: myprog.exe myprog.res
rc myprog.res
echo xxx > myprog.XXX
myprog.exe: a1.obj a2.obj myprog.def
link {blah, blah--exactly the same as above}
Now, just make myprog.XXX instead of myprog.EXE. This works by creating a
dummy file (myprog.xxx) to corrospond with the step of resource compiling;
the .exe file is only relinked when it changes.
p:S. A more elegant solution would probably be to use the resource
compiler's -FE switch (rename .exe file, SDK Tools FManual, p3-6), but I
haven't been able to get the damn thing to work.
dave dave@wucs1.wustl.edu
the mira corporation
314/434-4343
Technical Details
Message-ID:
<1991Mar5.205724.16385@cec1.wustl.edu>Path:
arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!wuarchive!cec2!newsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!wuarchive!cec2!news From: dave@wucs1.wustl.edu (David T Mitchell III) Newsgroups: comp.windows.ms.programmer Subject: Save time compiling-here's how! Message-ID: <1991Mar5.205724.16385@cec1.wustl.edu> Date: 5 Mar 91 20:57:24 GMT Organization: Washington University, St. Louis MO Lines: 42