How to get a Makefile from qmake

2019-02-16 12:59发布

问题:

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

回答1:

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