예제 #1
0
#!/usr/bin/env python3

import licant

licant.include("igris")

licant.cxx_application("target",
                       sources=["main.cpp"],
                       mdepends=["igris", "igris.dprint"],
                       cxxstd="gnu++17")

licant.ex("target")
예제 #2
0
#!/usr/bin/env python3

import licant

licant.include("ralgo")
licant.include("igris")
licant.include("nos")
licant.include("crow")

licant.cxx_application("simulator",
                       sources=["simulator_main.cpp", "motor_shield.cpp"],
                       mdepends=["ralgo", "igris", "nos"])

licant.ex("simulator")
예제 #3
0
#!/usr/bin/env python3

import licant
import os

licant.include("genos")

licant.glbfunc.genos_firmware(sources=["main.cpp"])
예제 #4
0
파일: make.py 프로젝트: mirmik/kernel
#!/usr/bin/env python3

import licant
import os

licant.include("libc", "../../src/libc/libc.g.py")

licant.cxx_application(
    "firmware.elf",
    toolchain=licant.cxx_make.toolchain_gcc("arm-none-eabi-"),
    sources=["main.c", "../../src/arch/arm/stm32/asm/stm32_start.c"],
    include_paths=[
        "../../src/arch/arm/stm32/", "../../src/arch/arm/armv7-e/",
        "../../src/", "../../src/posix", "../../src/libc"
    ],
    cc_flags="-mthumb -mcpu=cortex-m4",
    ld_flags=" ".join([
        "-nostdlib -nostdinc",
        "-T../../src/arch/arm/stm32/ldscripts/stm32f401re.ld",
        "-T../../src/arch/arm/stm32/ldscripts/stm32_common.ld"
    ]),
    mdepends=["compat.libc"])


@licant.routine(deps=["firmware.elf"])
def install():
    os.system("arm-none-eabi-objcopy -O binary firmware.elf firmware.bin")
    os.system("st-flash write firmware.bin 0x8000000")


def terminal(port="/dev/ttyACM0"):
예제 #5
0
파일: make.py 프로젝트: mirmik/heimer
#!/usr/bin/env python3

import licant

licant.include("heimer")

licant.cxx_shared_library(
    "heimer.so",
    mdepends=["heimer"],
)

licant.ex("heimer.so")
예제 #6
0
파일: make.py 프로젝트: mirmik/servoce
#!/usr/bin/env python3

import licant
from licant.cxx_modules import application
from licant.modules import submodule, module
from licant.libs import include

licant.include("servoce")

liboce_include_path = "/usr/local/include/opencascade/"

tests = [
	"curve3",
    "solid",
    "face",
    "wire",
    "trans"
]

tests_c = [
]

lib_prefix = ""

application("runtests",
	sources = (
		["main.cpp"] 
		+ [t+".cpp" for t in tests] 
		+ [t+".c" for t in tests_c]),

	ld_flags = "-L/usr/local/lib/",
예제 #7
0
#!/usr/bin/env python3
#coding: utf-8

import licant
import licant.install
import shutil
import os

licant.include("crow", "crow.g.py")

licant.execute("apps/crowker/make.py")
licant.execute("apps/ctrans/make.py")
licant.execute("apps/crowcalc/make.py")
licant.execute("apps/crowrequest/make.py")

target = "libcrow.so"
install_include_path = '/usr/local/include/crow'
install_directory_path = '/usr/lib/'
install_library_path = os.path.join(install_directory_path, target)
install_library_link = os.path.join(install_directory_path, 'libcrow.so')

licant.cxx_shared_library(
    target,
    mdepends=[
        "crow", "crow.crowker", "crow.udpgate", "crow.tcpgate",
        "crow.serial_gstuff"
    ],
    cxxstd="c++17",
    optimize="-O2",
    cxx_flags='-fPIC -Wall -pedantic -g',
    cc_flags='-fPIC -Wall -pedantic -g',
예제 #8
0
#!/usr/bin/env python3
#coding: utf-8

import licant
import licant.install
from licant.cxx_modules import application
from licant.libs import include
import os

licant.include("crow")

application("crowker",
            sources=["main.cpp", "control_node.cpp"],
            mdepends=["crow", "crow.crowker", "crow.udpgate"],
            optimize="-O2",
            cxx_flags="-Wextra -Wall",
            libs=["pthread", "readline", "nos", "igris"])

licant.install.install_application(tgt="install_crowker",
                                   src="crowker",
                                   dst="crowker")

if __name__ == "__main__":
    licant.install.install_application(tgt="install",
                                       src="crowker",
                                       dst="crowker")
    licant.ex("crowker")
예제 #9
0
#!/usr/bin/env python3

import licant

licant.include("ralgraph")

licant.cxx_application(
    "target",
    sources=["main.cpp"],
    mdepends=["ralgraph"],
    libs=["glfw3", "vulkan", "dl", "pthread", "GLEW", "GL", "GLU"]
    # "glfw3", "vulkan", "dl", "pthread", "GLEW", "GL", "GLU"
)

licant.ex("target")
예제 #10
0
#!/usr/bin/env python3

from wheel.bdist_wheel import bdist_wheel as bdist_wheel_
from setuptools import setup, Extension, Command
from distutils.util import get_platform
import os
import licant

licant.include("nos", "nos/nos.g.py")
licant.include("igris", "igris/igris.g.py")
licant.cxx_objects("nos-objects", mdepends=["nos", "igris.include"])
nosopts = licant.core.core.get("nos-objects").finalopts

add_sources = []
add_modules = []
add_moc = []

if os.name == "posix":
    liboce_include_path = "/usr/local/include/opencascade/"
    lib_prefix = ""

elif os.name == "nt":
    liboce_include_path = "../../OpenCASCADE-7.3.0-vc14-64/opencascade-7.3.0/inc"
    lib_prefix = "C:\\OpenCASCADE-7.3.0-vc14-64\\opencascade-7.3.0\\win64\\vc14\\lib\\"


class bdist_wheel(bdist_wheel_):
    def finalize_options(self):
        from sys import platform as _platform

        platform_name = get_platform()
예제 #11
0
#!/usr/bin/env python3
# coding: utf-8

import licant
import licant.libs
from licant.cxx_modules import application

licant.include("nos", "../../../nos/nos.g.py")
licant.execute("../../../servoce_inc.py")

application(
    "target",
    sources=["main.cpp"],
    include_paths=["."],
    mdepends=["servoce_sources", "nos"],
)

licant.ex(default="target")
예제 #12
0
파일: make.py 프로젝트: mirmik/malgo
#!/usr/bin/env python3

import licant
from licant.cxx_modules import application
from licant.modules import submodule, module
from licant.libs import include

licant.include("malgo")

tests = [
    "vector",
]

application("runtests",
            sources=["main.cpp"] + [t + ".cpp" for t in tests],
            mdepends=["malgo"],
            libs=["gtest", "pthread"])

licant.ex("runtests")
예제 #13
0
파일: make.py 프로젝트: sevikkk/servoce
#!/usr/bin/env python3
#coding: utf-8

import licant
from licant.cxx_modules import shared_library
from licant.modules import module

import licant.libs
import os

licant.execute("servoce_inc.py")
licant.include("nos")

install_lib_dir = "/usr/lib/"
install_inc_dir = "/usr/local/include/"

shared_library(
    "cxxbuild/libservoce.so",
    builddir='cxxbuild',
    mdepends=["servoce_sources", "nos"],
)


@licant.routine
def install():
    os.system("cp cxxbuild/libservoce.so {}".format(install_lib_dir +
                                                    "libservoce.so"))
    os.system("cp -r include/servoce {}".format(install_inc_dir))
    print("success install")

예제 #14
0
#!/usr/bin/env python3

import licant

licant.include("igris")
licant.include("genos")

licant.glbfunc.genos_firmware(
    sources=["main.cpp"],
    mdepends=["igris.stdlibs"],
)
예제 #15
0
파일: make.py 프로젝트: mirmik/malgo
#!/usr/bin/env python3
#coding: utf-8

import licant

licant.include("linalg-v3")
licant.include("malgo")
licant.include("nos")
licant.include("gxx")

licant.cxx_application("target",
                       sources=["main.cpp"],
                       mdepends=[
                           "linalg-v3",
                           "nos",
                           "gxx",
                           "malgo",
                           ("gxx.dprint", "__none__"),
                       ])

licant.ex("target")
예제 #16
0
#!/usr/bin/env python3
#coding: utf-8

from wheel.bdist_wheel import bdist_wheel as bdist_wheel_
from setuptools import setup, Extension, Command
from distutils.util import get_platform
import os
import glob
import licant

licant.include("nos", local_tunel=("pycrow/__tunels__/nos", "nos.g.py"))
licant.include("igris", local_tunel=("pycrow/__tunels__/igris", "igris.g.py"))
licant.include("crow", path="../../crow.g.py")
licant.cxx_objects("crow-objects",
                   mdepends=[
                       "crow", "crow.udpgate", "crow.crowker", "nos",
                       "nos.inet", "igris", "igris.syslock", "igris.dprint",
                       ("igris.ctrobj", "linux")
                   ])

crowopts = licant.core.core.get("crow-objects").finalopts


class bdist_wheel(bdist_wheel_):
    def finalize_options(self):
        from sys import platform as _platform
        platform_name = get_platform()

        if _platform == "linux" or _platform == "linux2":
            # Linux
            if platform_name == "linux-i686":