https://github.com/jonathanvdc/flame-make-scripts
Collection of GNU Make scripts that make depending on Flame tools easier.
https://github.com/jonathanvdc/flame-make-scripts
flame make makefile toolchain
Last synced: 4 months ago
JSON representation
Collection of GNU Make scripts that make depending on Flame tools easier.
- Host: GitHub
- URL: https://github.com/jonathanvdc/flame-make-scripts
- Owner: jonathanvdc
- License: mit
- Created: 2017-08-26T14:42:17.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-01T16:39:19.000Z (almost 9 years ago)
- Last Synced: 2025-10-18T23:30:14.918Z (8 months ago)
- Topics: flame, make, makefile, toolchain
- Language: Makefile
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flame Makefile scripts
[](https://travis-ci.org/jonathanvdc/flame-make-scripts)
This repository contains a collection of GNU Make scripts that locate and/or install Flame-based projects. The goal of these scripts is to minimize the amount of hassle users experience when building your project: they either find an existing install of a tool or automatically build it from source. Running `make` should Just Work.
You can simply copy the scripts and put them in your own repository or—better yet—include this repository as a git submodule.
## `ecsc`
[`use-ecsc.mk`](use-ecsc.mk) tries to find the [`ecsc` Enhanced C# compiler](https://github.com/jonathanvdc/ecsc) and exposes it using the `ECSC` variable. If there's no global `ecsc` command, then `use-ecsc.mk` builds `ecsc` from source and makes `$(ECSC)` expand to a command that runs the local `ecsc` build.
Here's an example Makefile that uses `use-ecsc.mk` to provide `ecsc`.
```makefile
include /path/to/use-ecsc.mk
out.exe: code.cs | ecsc
$(ECSC) code.cs -platform clr -o out.exe
```
Read the comments at the top of `use-ecsc.mk` for a more complete description.
## `flame-llvm`
[`use-flame-llvm.mk`](use-flame-llvm.mk) tries to find the [`flame-llvm` Flame IR -> LLVM IR compiler](https://github.com/jonathanvdc/flame-llvm) and exposes it using the `FLAME_LLVM` variable. If there's no global `flame-llvm` command, then `use-flame-llvm.mk` builds `flame-llvm` from source and makes `$(FLAME_LLVM)` expand to a command that runs the local `flame-llvm` build. Building from source only works if you're running a Debian-based distribution with LLVM 3.8 installed.
Here's an example Makefile that uses both `use-ecsc.mk` and `use-flame-llvm.mk` to compile a C# file to a native executable.
```makefile
include /path/to/use-ecsc.mk
include /path/to/use-flame-llvm.mk
a.out: code.cs | ecsc flame-llvm
$(ECSC) code.cs -platform ir -o obj.flo
$(FLAME_LLVM) obj.flo -platform llvm -o out.ll
clang out.ll -lgc -o a.out
```
Read the comments at the top of `use-flame-llvm.mk` for a more complete description.