makefile-abbreviated

来自「压缩包里有教材<<C++模式设计-基于QT4开源跨平台开发框架&gt」· 代码 · 共 70 行

TXT
70
字号
# Exerpts from a makefile####### Compiler, tools and optionsCC            = gcc     # executable for C compilerCXX           = g++     # executable  for c++ compilerLINK          = g++     # executable for linker# flags that get passed to the compilerCFLAGS        = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)CXXFLAGS      = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)INCPATH       = -I/usr/local/qt/mkspecs/default -I. \                -I$(QT4)/include/QtGui -I$(QT4)/include/QtCore \                -I$(QT4)/include# Linker flagsLIBS          = $(SUBLIBS) -L$(QT4)/lib -lQtCore_debug -lQtGui_debug -lpthreadLFLAGS        = -Wl,-rpath,$(QT4)/lib# macros for performing other operations as part of build steps:QMAKE         = /usr/local/qt/bin/qmake####### FilesHEADERS       =    # If we had some, they'd be here. SOURCES       = main.cppOBJECTS       = main.o[snip]QMAKE_TARGET  = qappDESTDIR       = TARGET        = qapp  # default target to buildfirst: all            # to build "first" we must build "all"####### Implicit rules.SUFFIXES: .c .o .cpp .cc .cxx .C.cpp.o:	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<## Possible targets to buildall: Makefile $(TARGET)  # this is how to build "all"$(TARGET):  $(OBJECTS) $(OBJMOC)    # this is how to build qapp	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(OBJCOMP) \    $(LIBS)        qmake:  FORCE               # "qmake" is a target too! 	@$(QMAKE) -o Makefile qapp.pro  # what does it do?dist:                               # Another target 	@mkdir -p .tmp/qapp \    && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) \        $(FORMS) $(DIST) .tmp/qapp/ \     &&  (cd `dirname .tmp/qapp` \ && $(TAR) qapp.tar qapp \          && $(COMPRESS) qapp.tar) \     && $(MOVE) `dirname .tmp/qapp`/qapp.tar.gz . \     && $(DEL_FILE) -r .tmp/qappclean:compiler_clean                # yet another target	-$(DEL_FILE) $(OBJECTS)	-$(DEL_FILE) *~ core *.core####### Dependencies for implicit rulesmain.o: main.cpp 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?