• 6176阅读
  • 0回复

大家帮忙注释一下qmake生成的Makefile阿~~!! [复制链接]

上一主题 下一主题
离线jollyjia
 

只看楼主 倒序阅读 楼主  发表于: 2006-05-12
#############################################################################
# Makefile for building: TestApp
# Generated by qmake (2.00a) (Qt 4.1.2) on: Fri May 12 10:02:01 2006
# Project: TestApp.pro
# Template: app
# Command: /work/Programs/Trolltech/Qt-4.1.2/bin/qmake -unix -o Makefile TestApp.pro
#############################################################################

####### Compiler, tools and options

CC         = gcc
CXX       = g++
LEX       = flex
YACC       = yacc
DEFINES     = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS     = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS     = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
LEXFLAGS     =
YACCFLAGS   = -d
INCPATH     = -I../../../Programs/Trolltech/Qt-4.1.2/mkspecs/linux-g++ -I. -I../../../Programs/Trolltech/Qt-4.1.2/include/QtCore -I../../../Programs/Trolltech/Qt-4.1.2/include/QtGui -I../../../Programs/Trolltech/Qt-4.1.2/include -I. -I. -I.
LINK       = g++
LFLAGS     = -Wl,-rpath,/work/Programs/Trolltech/Qt-4.1.2/lib
LIBS       = $(SUBLIBS) -L/work/Programs/Trolltech/Qt-4.1.2/lib -lQtGui_debug -L/work/Downloads/qt-x11-opensource-src-4.1.2/lib -L/usr/X11R6/lib -lpng -lSM -lICE -lXi -lXrender -lXrandr -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore_debug -lz -lm -ldl -lpthread
AR         = ar cqs
RANLIB     =
QMAKE       = /work/Programs/Trolltech/Qt-4.1.2/bin/qmake
TAR       = tar -cf
COMPRESS     = gzip -9f
COPY       = cp -f
COPY_FILE   = $(COPY)
COPY_DIR     = $(COPY) -r
INSTALL_FILE = $(COPY_FILE)
INSTALL_DIR   = $(COPY_DIR)
DEL_FILE     = rm -f
SYMLINK     = ln -sf
DEL_DIR     = rmdir
MOVE       = mv -f
CHK_DIR_EXISTS= test -d
MKDIR       = mkdir -p

####### Output directory

OBJECTS_DIR   = ./

####### Files

SOURCES     = form.cpp \
    main.cpp moc_form.cpp
OBJECTS     = form.o \
    main.o \
    moc_form.o
DIST       = ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/qconfig.pri \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/qt_config.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/exclusive_builds.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/default_pre.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/debug.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/default_post.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/warn_on.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/qt.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/unix/thread.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/moc.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/resources.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/uic.prf \
    TestApp.pro
QMAKE_TARGET = TestApp
DESTDIR     =
TARGET     = TestApp

first: all
####### Implicit rules

.SUFFIXES: .c .o .cpp .cc .cxx .C

.cpp.o:
  $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
  $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
  $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
  $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
  $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules

all: Makefile $(TARGET)

$(TARGET): $(OBJECTS)
  $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)

Makefile: TestApp.pro ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/linux-g++/qmake.conf ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/qconfig.pri \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/qt_config.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/exclusive_builds.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/default_pre.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/debug.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/default_post.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/warn_on.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/qt.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/unix/thread.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/moc.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/resources.prf \
    ../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/uic.prf \
    /work/Programs/Trolltech/Qt-4.1.2/lib/libQtGui_debug.prl \
    /work/Programs/Trolltech/Qt-4.1.2/lib/libQtCore_debug.prl
  $(QMAKE) -unix -o Makefile TestApp.pro
../../../Programs/Trolltech/Qt-4.1.2/mkspecs/qconfig.pri:
../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/qt_config.prf:
../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/exclusive_builds.prf:
../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/default_pre.prf:
../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/debug.prf:
../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/default_post.prf:
../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/warn_on.prf:
../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/qt.prf:
../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/unix/thread.prf:
../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/moc.prf:
../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/resources.prf:
../../../Programs/Trolltech/Qt-4.1.2/mkspecs/features/uic.prf:
/work/Programs/Trolltech/Qt-4.1.2/lib/libQtGui_debug.prl:
/work/Programs/Trolltech/Qt-4.1.2/lib/libQtCore_debug.prl:
qmake: FORCE
  @$(QMAKE) -unix -o Makefile TestApp.pro

dist:
  @$(CHK_DIR_EXISTS) ".tmp/TestApp1.0.0" || $(MKDIR) ".tmp/TestApp1.0.0"
  $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/TestApp1.0.0/ && $(COPY_FILE) --parents form.h .tmp/TestApp1.0.0/ && $(COPY_FILE) --parents form.cpp main.cpp .tmp/TestApp1.0.0/ && $(COPY_FILE) --parents form.ui .tmp/TestApp1.0.0/ && (cd `dirname .tmp/TestApp1.0.0` && $(TAR) TestApp1.0.0.tar TestApp1.0.0 && $(COMPRESS) TestApp1.0.0.tar) && $(MOVE) `dirname .tmp/TestApp1.0.0`/TestApp1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/TestApp1.0.0


yaccclean:
lexclean:
clean:compiler_clean
  -$(DEL_FILE) $(OBJECTS)
  -$(DEL_FILE) *~ core *.core


####### Sub-libraries

distclean: clean
  -$(DEL_FILE) $(TARGET)
  -$(DEL_FILE) Makefile


/work/Programs/Trolltech/Qt-4.1.2/bin/moc:
  (cd "$(QTDIR)/src/tools/moc" && $(MAKE))

mocclean: compiler_moc_header_clean compiler_moc_source_clean

mocables: compiler_moc_header_make_all compiler_moc_source_make_all

compiler_moc_header_make_all: moc_form.cpp
compiler_moc_header_clean:
  -$(DEL_FILE) moc_form.cpp
moc_form.cpp: ui_form.h \
    form.h \
    ../../../Programs/Trolltech/Qt-4.1.2/bin/moc
  /work/Programs/Trolltech/Qt-4.1.2/bin/moc $(DEFINES) $(INCPATH) form.h -o moc_form.cpp

compiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all:
compiler_image_collection_clean:
  -$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all: ui_form.h
compiler_uic_clean:
  -$(DEL_FILE) ui_form.h
ui_form.h: form.ui
  /work/Programs/Trolltech/Qt-4.1.2/bin/uic form.ui -o ui_form.h

compiler_clean: compiler_moc_header_clean compiler_rcc_clean compiler_image_collection_clean compiler_moc_source_clean compiler_uic_clean

####### Compile

form.o: form.cpp form.h \
    ui_form.h

main.o: main.cpp form.h \
    ui_form.h

moc_form.o: moc_form.cpp

####### Install

install:   FORCE

uninstall:   FORCE

FORCE:



学习过Makefile的编写,也懂得它的基本规则,但对QMAKE生成的Makefile还是感到比较晦涩,总在用这个东西的,
也许很多人说这个不必关注,但我认为还有有搞清楚的必要,希望大家帮忙把他搞清楚。谢谢。
[ 此贴被XChinux在2006-05-12 18:10重新编辑 ]
快速回复
限100 字节
 
上一个 下一个