Make
How to use Make with Cheerp
To integrate Cheerp into a project that uses Make, you have two options.
Override CC and CXX
For well-behaved Make projects, you can override the CC
and CXX
variables to use Cheerp instead:
$ make CC=/opt/cheerp/bin/clang CXX=/opt/cheerp/bin/clang++
Makefile snippet
To permanently make a Makefile use Cheerp, add this snippet:
ifeq ($(OS),Windows_NT) CHEERP ?= C:/cheerpelse UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) CHEERP ?= /opt/cheerp else ifeq ($(UNAME_S),Darwin) CHEERP ?= /Applications/cheerp endifendif
%.js: %.cpp ${CHEERP}/bin/clang++ $< -o $@