• 老大写得一个非常高大上的Makefile,包括非常多语法:


    一个非常高大上的Makefile,包括非常多语法:

    TARGET = api-login
    INSTALL_PATH = /huishoubao/cgi
    
    include ../../implements/log/Makefile.log
    include ../../implements/tools/Makefile.tools
    include ../../implements/db/Makefile.db
    include ../../implements/configure/Makefile.configure
    include ../../implements/protocol/Makefile.protocol
    include ../../implements/user/Makefile.user
    include ../../implements/logic/Makefile.logic
    
    vpath %.cpp ../../implements/log
    vpath %.cpp ../../implements/tools
    vpath %.cpp ../../implements/db
    vpath %.cpp ../../implements/configure
    vpath %.cpp ../../implements/protocol
    vpath %.cpp ../../implements/user
    vpath %.cpp ../../implements/logic
    
    INCLUDES = -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/logic
    
    LIBDIRS = -L/usr/local/lib 
              -L/usr/lib64/mysql
    
    LIBS += -lfcgi 
            -ljson 
            -lmysqlclient 
            -llog4cplus -lpthread 
            -lcrypto 
            -lmemcached 
            -lneo_cgi -lneo_utl -lneo_cs 
            -lcurl
    
    CC = gcc
    CXX = g++
    
    CXXFLAGES += -Wall -O2
    LDFLAGS = -Wl,-R /usr/local/lib
    
    RM = rm -f
    CP = cp -f
    
    SOURCES += api-login.cpp 
    
    OBJECTS = $(SOURCES:.cpp=.o)
    
    .PHONY : all clean install mem
    
    all:$(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.o
    
    install:
    	-$(CP) $(TARGET) $(INSTALL_PATH)/$(TARGET)
    	-$(CP) ../../implements/log/log4cplus.properties /data/log/
    


  • 相关阅读:
    elixir——修改成国内源镜像
    c# 选择文件或目录
    leetcode10 正则表达式匹配
    WPF常用布局
    openpyxl
    uWSGI的编码问题解决方法
    安装condardkitchempropuwsgi
    docker 中Ubuntu aptget换源
    二进制k8s 集群新增加node 节点
    基于黑群的家庭服务中心搭建记录
  • 原文地址:https://www.cnblogs.com/yfceshi/p/7213713.html
Copyright © 2020-2023  润新知