Diferencia entre revisiones de «Introducción a Patrones de Diseño en C++ con Qt4/1.9 El comando make»

Contenido eliminado Contenido añadido
Paynalton (discusión | contribs.)
Paynalton (discusión | contribs.)
Línea 14:
# Extractos de un ''makefile''
####### CompilerCompilador, toolsherramientas andy optionsopciones
CC = gcc # executableejecutable forpara Cel compilercompilador C
CXX = g++ # executableejecutable forpara cel compilador C++ compiler
LINK = g++ # executableejecutable forpara linkerel enlazador
# marcas para ser pasadas al compilador
Línea 31:
LFLAGS = -Wl,-rpath,$(QT4)/lib
# macros para realizar otras operaciones como parte de los pasos de construcciónsconstrucción:
QMAKE = /usr/local/qt/bin/qmake
####### FilesArchivos
HEADERS = # IfSi wetenemos had somealguno, they'ddebería beestar hereaquí.
SOURCES = main.cpp
OBJECTS = main.o
Línea 42:
QMAKE_TARGET = qapp
DESTDIR =
TARGET = qapp # defaultObjetivo targetpor todefecto buildpara construir
first: all # topara buildconsstruir "first" wedebemos must buildconstruir "all"
####### ImplicitReglas rulesImplícitas
.SUFFIXES: .c .o .cpp .cc .cxx .C
Línea 53:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
## Posibles objetivos para construir
## Possible targets to build
all: Makefile $(TARGET) # thisesto ises howcomo tose buildconstruye "all"
$(TARGET): $(OBJECTS) $(OBJMOC) # thisesto ises howcomo tose buildconstruye qapp
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(OBJCOMP) \
$(LIBS)
qmake: FORCE # ¡"qmake" ises aun targetobjetivo tootambién!
@$(QMAKE) -o Makefile qapp.pro # what¿que doeshizo it doesto?
dist: # AnotherOtro targetobjetivo
@mkdir -p .tmp/qapp \
&& $(COPY_FILE) --parents $(SOURCES) $(HEADERS) \
Línea 73:
&& $(DEL_FILE) -r .tmp/qapp
clean:compiler_clean # yetotro anotherobjetivo targetmás
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core
####### DependenciesDependencias forpara implicitreglas rulesimplícitas
main.o: main.cpp