我的erlang的makefile模板

目前还不支持文件夹的遍历,只能一个一个写上去。


.SUFFIXES: .erl .beam

.erl.beam:
erlc ${ERLC_FLAGS} $<

SOURCES = ${wildcard src/api/twitter/*.erl} ${wildcard src/ui/*.erl}
BINS = bin
INCLUDES = include
ERLC_FLAGS = -W -I ${INCLUDES} -o ${BINS}

all: compile

compile: initDirs ${SOURCES:%.erl=%.beam}

initDirs:
mkdir -p bin

test: compile
erl -noshell -pa $(BINS) -s client test -s init stop

  1. 干啥的啊,在哪用的。

      • kmlzkma
      • December 5th, 2009

      自动化开发的,在linux下的shell上用。

  1. No trackbacks yet.