aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2011-10-14 03:17:19 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2011-10-14 03:17:19 +0200
commitb57628e6519b5a031bbba970c70fb8c2ac204640 (patch)
treef06acd567dde5dcdb05bc729577c0f9137d994bb /Makefile
parent3086c6ce36ddb10246e50d3a093879877b398ba1 (diff)
downloaderlang-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--Makefile33
1 files changed, 17 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index a8a4c78..579b140 100644
--- a/Makefile
+++ b/Makefile
@@ -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