diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2011-10-14 03:17:19 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2011-10-14 03:17:19 +0200 |
commit | b57628e6519b5a031bbba970c70fb8c2ac204640 (patch) | |
tree | f06acd567dde5dcdb05bc729577c0f9137d994bb /Makefile | |
parent | 3086c6ce36ddb10246e50d3a093879877b398ba1 (diff) | |
download | erlang-slang-fork-b57628e6519b5a031bbba970c70fb8c2ac204640.tar.gz |
replaced half autoconf build system with a simpler GNU make and Emake based one
new build system adheres to common usage of make command line and
environment variables
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
1 files changed, 17 insertions, 16 deletions
@@ -1,22 +1,23 @@ +export CC ?= gcc +export ERL ?= erl +export RM ?= rm -DIRS = src c_src demo +CFLAGS ?= -O2 +CPPFLAGS ?= +LDFLAGS ?= -all clean: - @set -e ; \ - for d in $(DIRS) ; do \ - if [ -d $$d ]; then ( cd $$d && $(MAKE) $@ ) || exit 1 ; fi ; \ - done +override CFLAGS += -Wall -debug: - @set -e ; \ - for d in $(DIRS) ; do \ - if [ -d $$d ]; then ( cd $$d && $(MAKE) TYPE=debug ) || exit 1 ; fi ; \ - done +export CFLAGS CPPFLAGS LDFLAGS +all: + $(MAKE) -C c_src $@ + $(ERL) -noinput -eval \ + "case make:all() of up_to_date -> halt(0); error -> halt(1) end" +install: + $(MAKE) -C c_src $@ -# possibly with --with-slang-include arg -conf: - (cd config; ./configure) - - +clean: + $(MAKE) -C c_src $@ + $(RM) -f {ebin,demo}/*.beam |