12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #pragma once
-
- #include <vector>
- #include <string>
-
- #include "SourceFile.h"
-
- namespace toolchain {
-
- enum TargetType {
- BINARY,
- SHARED_LIBRARY,
- STATIC_LIBRARY,
- };
-
- std::string objectFilePath(
- const std::string &srcDir,
- const std::string &name,
- const std::string &outDir);
- std::string targetFilePath(
- TargetType type,
- const std::string &name,
- const std::string &outDir);
-
- void getPkgConfigFlags(const std::vector<std::string> &pkgs, std::vector<std::string> &flags);
- void getPkgConfigLDLibs(const std::vector<std::string> &pkgs, std::vector<std::string> &flags);
-
- void getDependencies(
- const std::vector<std::string> &flags,
- SourceFile::FileType type,
- const std::string &srcDir,
- const std::string &name,
- std::vector<std::string> &deps);
-
- std::vector<std::string> getCompileCommand(
- const std::vector<std::string> &flags,
- SourceFile::FileType type,
- const std::string &srcDir,
- const std::string &name,
- const std::string &outDir);
-
- void compile(
- const std::vector<std::string> &flags,
- SourceFile::FileType type,
- const std::string &srcDir,
- const std::string &name,
- const std::string &outDir);
-
- void link(
- const std::string &name,
- const std::vector<std::string> &ldFlags,
- const std::vector<std::string> &ldLibs,
- SourceFile::FileType type,
- TargetType targetType,
- const std::vector<std::string> &objs,
- const std::string &outDir);
-
- }
|