Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 48 lines (37 sloc) 0.948 kB
dc3cc4e @rvirding Fix Makefile and add Emakefile and lfe.app.
authored
1 # Makefile for LFE
bb7ff10 @tuncer Cleanup rebar usage
tuncer authored
2 # This simple Makefile uses rebar to compile/clean if it
dc3cc4e @rvirding Fix Makefile and add Emakefile and lfe.app.
authored
3 # exists, else does it explicitly.
277c981 @rvirding Initial release.
authored
4
dc3cc4e @rvirding Fix Makefile and add Emakefile and lfe.app.
authored
5 EBINDIR = ebin
6 SRCDIR = src
7 INCDIR = include
8 DOCDIR = doc
9 EMACSDIR = emacs
10
11 VPATH = $(SRCDIR)
12
13 ERLCFLAGS = -W0 +debug_info
14 ERLC = erlc -I $(INCDIR) -o $(EBINDIR) $(ERLCFLAGS)
15
16 ## The .erl and .beam files
17 SRCS = $(notdir $(wildcard $(SRCDIR)/*.erl))
18 EBINS = $(SRCS:.erl=.beam)
19
20 ## Where we install LFE, in the ERL_LIBS directory.
704ac7f @rvirding Fixed Makefile to actually do compilation.
authored
21 INSTALLDIR = $(ERL_LIBS)/lfe
277c981 @rvirding Initial release.
authored
22
23 all: compile docs
24
25 compile:
dc3cc4e @rvirding Fix Makefile and add Emakefile and lfe.app.
authored
26 if which -s rebar; \
27 then rebar compile; \
704ac7f @rvirding Fixed Makefile to actually do compilation.
authored
28 else $(ERLC) $(addprefix $(SRCDIR)/, $(SRCS)); \
dc3cc4e @rvirding Fix Makefile and add Emakefile and lfe.app.
authored
29 fi
30
31 install:
bb7ff10 @tuncer Cleanup rebar usage
tuncer authored
32 if [ "$$ERL_LIBS" != "" ]; \
dc3cc4e @rvirding Fix Makefile and add Emakefile and lfe.app.
authored
33 then mkdir -p $(INSTALLDIR)/$(EBINDIR) ; \
704ac7f @rvirding Fixed Makefile to actually do compilation.
authored
34 cp -pPR $(EBINDIR) $(INSTALLDIR); \
35 cp -pPR $(EMACSDIR) $(INSTALLDIR); \
9bb19fd @rvirding Add simple include-lib macro
authored
36 cp -pPR $(INCDIR) $(INSTALLDIR); \
dc3cc4e @rvirding Fix Makefile and add Emakefile and lfe.app.
authored
37 else exit 1; \
38 fi
277c981 @rvirding Initial release.
authored
39
40 docs:
41
42 clean:
dc3cc4e @rvirding Fix Makefile and add Emakefile and lfe.app.
authored
43 if which -s rebar; \
44 then rebar clean; \
45 else rm -rf $(EBINDIR)/*.beam; \
46 fi
277c981 @rvirding Initial release.
authored
47 rm -rf erl_crash.dump
Something went wrong with that request. Please try again.