Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (31 sloc) 0.963 kb
SOURCE_DIR=src
EBIN_DIR=ebin
INCLUDE_DIR=include
INCLUDES=$(wildcard $(INCLUDE_DIR)/*.hrl)
SOURCES=$(wildcard $(SOURCE_DIR)/*.erl)
TARGETS=$(patsubst $(SOURCE_DIR)/%.erl, $(EBIN_DIR)/%.beam,$(SOURCES))
ERLC_OPTS=-I $(INCLUDE_DIR) -o $(EBIN_DIR) -Wall +debug_info # +native -v
DIST_DIR=dist
SIGNING_KEY_ID=E96F1FA7
all: $(TARGETS)
$(EBIN_DIR)/%.beam: $(SOURCE_DIR)/%.erl $(INCLUDES)
erlc $(ERLC_OPTS) $<
clean:
rm -f ebin/*.beam
rm -f $(TARGETS)
dist: all
mkdir -p $(DIST_DIR)
cp -r doc ebin include src test Makefile $(DIST_DIR)
distclean: clean
rm -rf $(DIST_DIR)
find . -name '*~' -exec rm {} \;
debian-package: clean
tar -cf debian-package.tar .
mkdir build
cd build; tar -xf ../debian-package.tar
cd build; dpkg-buildpackage -rfakeroot -k$(SIGNING_KEY_ID)
rm -rf build debian-package.tar
test-compile:
erlc $(ERLC_OPTS) $(wildcard test/*.erl)
test: all test-compile
erl -pa ebin -noshell -eval 'passed = test_rfc4627:test_all(), c:q().'
Jump to Line
Something went wrong with that request. Please try again.