Skip to content

Instantly share code, notes, and snippets.

@dysinger
Created April 16, 2009 03:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dysinger/96186 to your computer and use it in GitHub Desktop.
Save dysinger/96186 to your computer and use it in GitHub Desktop.
Simple Makefile for Lisp Flavored Erlang
LFE_SRC := $(wildcard src/*.lfe)
LFE_BEAM := $(LFE_SRC:src/%.lfe=ebin/%.beam)
INCL_DIRS := $(wildcard deps/*/include) include
EBIN_DIRS := $(wildcard deps/*/ebin) ebin
FLAGS := -noshell -noinput $(INCL_DIRS:%=-I %) $(EBIN_DIRS:%=-pa %)
OPTIONS := {outdir,"ebin"}
compile: $(LFE_BEAM)
ebin/%.beam: src/%.lfe
@mkdir -p ebin
@erl $(FLAGS) -eval \
'case lfe_comp:file("$<",[report,$(OPTIONS)]) of error -> halt(1); _ -> halt(0) end.'
repl:
@erl $(FLAGS) -s lfe_boot start
clean:
@rm -rf $(LFE_BEAM) *.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment