The boss wrote a very large Makefile, which contains many syntaxes: The boss makefile

Source: Internet
Author: User

The boss wrote a very large Makefile, which contains many syntaxes: The boss makefile

A very large Makefile contains many syntaxes:

TARGET = api-loginINSTALL_PATH = /huishoubao/cgiinclude ../../implements/log/Makefile.loginclude ../../implements/tools/Makefile.toolsinclude ../../implements/db/Makefile.dbinclude ../../implements/configure/Makefile.configureinclude ../../implements/protocol/Makefile.protocolinclude ../../implements/user/Makefile.userinclude ../../implements/logic/Makefile.logicvpath %.cpp ../../implements/logvpath %.cpp ../../implements/toolsvpath %.cpp ../../implements/dbvpath %.cpp ../../implements/configurevpath %.cpp ../../implements/protocolvpath %.cpp ../../implements/uservpath %.cpp ../../implements/logicINCLUDES = -I/usr/local/include/log4cplus \           -I/usr/local/include/ClearSilver \           -I/usr/include/mysql \           -I../../implements/log \           -I../../implements/tools \           -I../../implements/db \           -I../../implements/configure \           -I../../implements/protocol \           -I../../implements/user \           -I../../implements/logicLIBDIRS = -L/usr/local/lib \          -L/usr/lib64/mysqlLIBS += -lfcgi \        -ljson \        -lmysqlclient \        -llog4cplus -lpthread \        -lcrypto \        -lmemcached \        -lneo_cgi -lneo_utl -lneo_cs \        -lcurlCC = gccCXX = g++CXXFLAGES += -Wall -O2LDFLAGS = -Wl,-R /usr/local/libRM = rm -fCP = cp -fSOURCES += api-login.cpp OBJECTS = $(SOURCES:.cpp=.o).PHONY : all clean install memall:$(TARGET)mem:$(CXX) -c -std=c++0x ../../implements/tools/memcached.cpp -o memcached.o$(TARGET):$(OBJECTS)$(CXX) -o $(TARGET) memcached.o $(OBJECTS) $(LDFLAGS) $(LIBDIRS) $(LIBS)$(OBJECTS):%.o:%.cpp$(CXX) -c $(CXXFLAGES) $(INCLUDES) $< -o $@clean:-$(RM) $(TARGET) $(OBJECTS) memcached.oinstall:-$(CP) $(TARGET) $(INSTALL_PATH)/$(TARGET)-$(CP) ../../implements/log/log4cplus.properties /data/log/



Which of the following statements about makefile syntax is wrong?

The content must start with the tab key.
For example:
Find. out: main. o getlines. o
Gcc main. o getlines. o-o find. out

What is the difference between makefile and bashshell syntax?

Is two different things,
The most important feature is that makefile supports name = value.
While bashshell can only use name = value and no space beside the equal sign

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.