From: Francesco M. <f18...@ya...> - 2005-11-20 23:12:23
|
Hi, John Labenski wrote: >>but for some reason, internal.cpp includes luasetup.h.in: >>#include "../../../bindings/wxwidgets/luasetup.h.in" // get the base library setup parameters >>which instead has a: >>#define wxLUA_USE_FL 1 > > > I think the solution to making it possible to have multiple version of > the wxlua bindings for different projects lies in making the compiler > include luasetup.h for us. This is not a "standard" solution; rather that, I'd prefer to use the same system adopted for wxWidgets: on win32 they provide a default setup.h which can then be customized by the user before compiling. On unix a setup.h is generated from setup.h.in using the values of the --enable-xxx features. > In modules/wxbind/src/Makefile I've done this. > > WXLUASETUP = luasetup.h > ... > .cpp.o: > $(CXX) -include $(WXLUASETUP) -c $(CXXFLAGS) $(APPEXTRADEFS)-o $@ $< > > so when you run > $make WXLUASETUP=../path/to/your/luasetup.h > you can use your own luasetup.h file. > > I couldn't find the equivalent for gcc's "-include" using nmake (MS's > compiler). Does anyone know if *all* compilers have this capability? I > assume yes? I really fear that most of win32 compilers do not have such option: I couldn't find it for CL (MSVC's compiler) nor for BCC32 (borland's one)... > This should be pretty self explanitory. We could be less strict and > just #include a default luasetup.h I think that on win32 we should always use a default luasetup.h; if the number of options is not too big (say, < 16) we could use options in the makefiles: USE_FL, USE_STC, etc... So that instead of editing setup.h for wxLua, the user would just need to call: nmake -fmakefile.vc USE_FL=1 USE_STC=1 to override the USE_FL=0 & USE_STC=0 defaults. > We also need to do the same for the output library path and name, so > people can override them on the commandline or their own Makefiles for > their project. why would user need to override the output library name ? Also, the output path should be the usual wxLua/lib... > So... the one question remains, do all compilers support something > equivalent to gcc's "-include" directive? Also, can bakefile handle > this sort of thing? If an equivalente GCC option existed, bakefile could support it. Unfortunately I think that about 90% of GCC options are too 'advanced' for other compilers (which would be nice to support anyway)... Francesco |