Hi.

I want to set some arbitrary variable in the makefile generated by qmake. How can I do this? I can't imaging this can't be done but can't find mention of it anywhere.

Use case; I want to generate a makefile compatible with the GNU stds, which entails defining vars in the make file such as "prefix" that can be overridden when running the make file. So for example my .pro would look like:

Qt Code:
  1. TEMPLATE = app
  2. TARGET = foo
  3. CONFIG += ...
  4. CCFLAGS += -g
  5. prefix=/usr/local/
  6. exec_prefix=$(prefix)
  7. bindir=$(exec_prefix)/bin
  8. datarootdir=$(prefix)/share
  9. datadir=$(datarootdir)
  10. libdir=$(exec_prefix)/lib
  11. ...
To copy to clipboard, switch view to plain text mode 

But I need most of those variables exported to the Makefile.

Thanks.