Skip to content

Commit

Permalink
top level makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Cliff Moon committed Mar 12, 2009
1 parent 34dfd9b commit 9a14c8d
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
RELDIR = releases/$(PACKAGE_NAME)-$(PACKAGE_VERSION)

ifeq ($(shell uname),Linux)
ARCH = linux
else
ARCH = macosx
endif

all:
(cd c;$(MAKE))
(cd erl;$(MAKE))

clean:
(cd c;$(MAKE) clean)
(cd erl;$(MAKE) clean)

test:
(cd c; $(MAKE) test)
(cd erl; $(MAKE) test)

install: all
(cd c; $(MAKE) install)
(cd erl; $(MAKE) install)

debug:
(cd c;$(MAKE) debug)
(cd erl;$(MAKE) debug)

release: all
mkdir -p $(RELDIR)
cp -r ebin $(RELDIR)/
cp -r priv $(RELDIR)/
mkdir -p $(RELDIR)/src
cp -r erl/*.erl $(RELDIR)/src/
cp -r c/*.c $(RELDIR)/src
cp -r c/*.h $(RELDIR)/src
sed s/?VERSION/$(PACKAGE_VERSION)/ releases/cherly.rel > $(RELDIR)/cherly.rel
sed s/?VERSION/$(PACKAGE_VERSION)/ ebin/cherly.app > $(RELDIR)/ebin/cherly.app
cd $(RELDIR); erl -pa ./ebin -eval "systools:make_script(\"cherly\", [local])." -eval "systools:make_tar(\"cherly\")." -s erlang halt

0 comments on commit 9a14c8d

Please sign in to comment.