[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Batch-Mode" rules with Microsoft compile
From: |
John Skiff |
Subject: |
Re: "Batch-Mode" rules with Microsoft compile |
Date: |
Wed, 28 Mar 2001 12:19:40 -0500 |
CXX = Cl
CXXFLAGS = -GR -vmm -D_MT -Zi -Od -D_DEBUG -MTd -GZ -FD -I../include
ifndef CCSRC
CCSRC := $(wildcard *.cpp)
endif
ifndef CCOBJ
CCOBJ := $(CCSRC:%.cpp=%.obj)
endif
LINKOPTIONS =/nologo /machine:ix86
ev_addpath.exe: $(CCOBJ)
link $(LINKOPTIONS) /out:ev_addpath.exe $(CCOBJ) \
authfake.lib evobj7.lib evutil7.lib
$(CCOBJ): $(CCSRC)
$(CXX) $(CXXFLAGS) -c $?
touch $(CCOBJ)
addPathData.cpp: ../include/evSysDep.h ../include/evutil.h
../include/EarthVision.h ../include/evGeoSpace.h ../include/evObj.h
../include/evError.h ../include/evWellObj.h ../include/evObject.h
../include/evSQL.h
ev_addpath.cpp: ../include/evSysDep.h ../include/evutil.h
../include/EarthVision.h ../include/evGeoSpace.h ../include/evObj.h
../include/evError.h ../include/evLicense.h ../include/evWellObj.h
../include/evObject.h ../include/evSQL.h
The above is modified and boiled down. With the above changing an
include file doesn't cause the source to recompile for some reason.
Thanks,
john
P.S. All of .h files for each .ccp are on one line but they wrap in the
email.
"Paul D. Smith" wrote:
> Can you show me an example of your makefile?
>
> You must be adding the headers as prerequisites to the "all.os" (or your
> equivalent); that is clearly not right. You don't want to rebuild the
> _header_ files if they change!
>
> You need to declare that the .c files depend on the .h files (normally
> this isn't the right thing to do, but in this case you'll have to do it
> that way). Use an empty rule. Then make will imagine that the .c file
> was modified whenever one of the headers was modified, and it will get
> rebuilt.
>
> --
> -------------------------------------------------------------------------------
> Paul D. Smith <address@hidden> Find some GNU make tips at:
> http://www.gnu.org http://www.paulandlesley.org/gmake/
> "Please remain calm...I may be mad, but I am a professional." --Mad Scientist