GithubHelp home page GithubHelp logo

lenspolishing's Introduction

编译规则说明

  基于linux下Makefile语法实现的支持c,cpp编译的脚本,支持编译可执行文件,静态库和动态库,脚本执行依赖部分env环境,使用前需要将env/*中的信息加载到系统环境中,具体加载系统环境可参考外部目录下README.md说明,具体实现脚本的规则详细见下面分类。
编译后所有文件会放置在buildout目录下,支持arm(arm32), aarch64(arm64), i386(x86)三个平台。

编译可执行文件Makefile例程

#编译输出可执行文件
BUILD?=e

#添加CPP flags
CCFLAGS:=-O3 -std=c++17 -fno-strict-aliasing -lrt

#添加头文件目录
INCLUDES=-I include/

#编译输出
buildout=test

#编译的cpp文件
cpp_objects=test_cpp.o

include $(ENV_PATH_ROOT)/build/buildrules.mk

编译静态库Makefile例程

#编译输出可执行文件
BUILD?=s

#添加C flags
CFLAGS :=

#添加头文件目录
INCLUDES=-I include/

#编译输出格式为libtest.a
buildout=libtest

#编译的c文件
c_objects=test_c.o

include $(ENV_PATH_ROOT)/build/buildrules.mk

编译动态库Makefile例程

#编译输出可执行文件
BUILD?=d

#添加C/CPP flags
CFLAGS :=
CCFLAGS :=

#添加头文件目录
INCLUDES=-I include/

#编译输出格式为libtest.so
buildout=libtest

#编译的c/cpp文件
c_objects=test_c.o
cpp_obects=test_cpp.o

include $(ENV_PATH_ROOT)/build/buildrules.mk

lenspolishing's People

Contributors

xiangyouzhu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.