bazelmake

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMakefile

func CreateMakefile(cfg *Config) ([]byte, error)

Types

type BuildTargetLibraryConfig

type BuildTargetLibraryConfig struct {
	Library string `yaml:"library"`
	Path    string `yaml:"path"`
	Name    string `yaml:"name"`
}

type CCLibrary

type CCLibrary struct {
	File                 *File
	Name                 string
	Sources              []string
	Headers              []string
	Options              []string
	Dependencies         []string
	ResolvedDependencies []*CCLibrary
}

func (*CCLibrary) FQDN

func (lib *CCLibrary) FQDN() string

func (*CCLibrary) ObjectFileName

func (lib *CCLibrary) ObjectFileName() string

func (*CCLibrary) SourcePaths

func (lib *CCLibrary) SourcePaths(root string) []string

type Config

type Config struct {
	Root            string                      `yaml:"root"`
	Targets         []*BuildTargetLibraryConfig `yaml:"targets"`
	Ignores         []*IgnoreConfig             `yaml:"ignores"`
	Libraries       []*LibraryConfig            `yaml:"libraries"`
	Output          string                      `yaml:"output"`
	Compiler        string                      `yaml:"compiler"`
	IncludePaths    []string                    `yaml:"include_paths"`
	Sources         []string                    `yaml:"sources"`
	CompilerOptions []string                    `yaml:"compiler_options"`
	LinkerOptions   []string                    `yaml:"linker_options"`
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

type File

type File struct {
	Path        string
	Library     *LibraryConfig
	CCLibraries []*CCLibrary
	// contains filtered or unexported fields
}

func (*File) FQDN

func (f *File) FQDN() string

type IgnoreConfig

type IgnoreConfig struct {
	Path string `yaml:"path"`
	Name string `yaml:"name"`
}

type LibraryConfig

type LibraryConfig struct {
	Name string `yaml:"name"`
	Root string `yaml:"root"`
}

type LibraryFileMap

type LibraryFileMap map[string]*File

type LibraryLocation

type LibraryLocation struct {
	Library   *LibraryConfig
	Path      string
	CCLibName string
	Original  string
}

type Makefile

type Makefile struct {
	Root            string
	Output          string
	Compiler        string
	ExtSources      []string
	IncludePaths    []string
	CompilerOptions []string
	LinkerOptions   []string
	TargetLibs      []*CCLibrary
	// contains filtered or unexported fields
}

func (*Makefile) Sources

func (m *Makefile) Sources() []*NameAndPath

type NameAndPath

type NameAndPath struct {
	Name string
	Path string
}

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

func NewResolver

func NewResolver(cfg *Config) *Resolver

func (*Resolver) Resolve

func (r *Resolver) Resolve() ([]*CCLibrary, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL