Skip to content

Commit

Permalink
Adds HiPE compilation support, with "make hipe".
Browse files Browse the repository at this point in the history
  • Loading branch information
schwink committed Aug 9, 2010
1 parent 9bb97b4 commit 5ede796
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
13 changes: 9 additions & 4 deletions server/kanaloa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ all: ebin/
(cd src;$(MAKE) all)
(cd test;$(MAKE) all)

force:
# This requires the erlang-base-hipe package.
hipe: ebin/
(cd src;$(MAKE) all native=true)

doc: force
doc:
(cd src;$(MAKE) edoc)

test: force
test: tbin/
(cd src;$(MAKE) test)

clean:
Expand All @@ -30,6 +32,9 @@ dialyzer:
ebin/:
@mkdir -p ebin

tbin/:
@mkdir -p tbin

install:
@mkdir -p $(DEST_EBIN) || true
cp ebin/* $(DEST_EBIN)
Expand All @@ -38,7 +43,7 @@ install:
@mkdir -p $(DEST_DOC) || true
cp doc/* $(DEST_DOC) || true

package: force
package:
# Increment the version number
dch --newversion $(VERSION)-1-`date +"%Y%m%d%H%M%S"` "Local build"
dpkg-buildpackage -rfakeroot -b -uc -tc
5 changes: 3 additions & 2 deletions server/kanaloa/support/include.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ ifdef debug
ERLC_FLAGS += -Ddebug
endif

# TODO: ERLC +native
ifdef native
ERLC_FLAGS += +native
endif

EBIN_DIR := ../ebin
TBIN_DIR := ../tbin
Expand All @@ -42,7 +44,6 @@ $(EBIN_DIR)/%.$(EMULATOR): %.erl
$(ERLC) $(ERLC_FLAGS) -o $(EBIN_DIR) $<

$(TBIN_DIR)/%.$(EMULATOR): %.erl
@mkdir -p $(TBIN_DIR) || true
$(ERLC) $(ERLC_FLAGS) -o $(TBIN_DIR) $<

./%.$(EMULATOR): %.erl
Expand Down

0 comments on commit 5ede796

Please sign in to comment.