How to get a Makefile from qmake

20,027

I gues that you're using Mac OS X

qmake -spec macx-g++ x.pro on Mac OS X to generate Makefile

qmake x.pro on linux to generate Makefile (default behaviour)

qmake -spec win32-g++ x.pro on Windows to generate Makefile

Share:
20,027
Admin
Author by

Admin

Updated on January 25, 2020

Comments

  • Admin
    Admin over 4 years

    Given an x.pro file, how can I produce a makefile? Running qmake x.pro produces an x.pbproj directory without a Makefile.

    Thanks

    Edit: Adding info. about the pro file and platform. I am running this on Mac OS X (10.6). The same pro file used to produce a Makefile under OpenSUSE. Here is a snippet of the pro file:

    TEMPLATE = lib
    TARGET = x
    DEPENDPATH +=
    INCLUDEPATH +=
    CONFIG += qt debug
    QT = core network
    # Input
    LIBS += -lcryptopp
    HEADERS += x.hpp
    ..... # rest of the header files
    
  • macetw
    macetw almost 8 years
    Consider also setting the environment variable QMAKESPEC to macx-g++. That would save time.