erlang
/
osmo-map-masq
Archived
4
0
Fork 0

Add Makefile.otp and Emakefile for erlang build system

This commit is contained in:
Harald Welte 2010-08-07 19:33:03 +02:00
parent aed61bf02a
commit 55497ba30c
2 changed files with 37 additions and 0 deletions

6
Emakefile Normal file
View File

@ -0,0 +1,6 @@
{["src/*"],
[{i, "include"},
{outdir, "ebin"},
debug_info]
}.

31
Makefile.otp Normal file
View File

@ -0,0 +1,31 @@
ERL=erl
APP=epcap
CC=gcc
ERL_LIB=/usr/local/lib/erlang/lib/erl_interface-3.7
#ARCH=-m32
CFLAGS=-g -Wall
CPPFLAGS=-I$(ERL_LIB)/include
LDFLAGS=-L$(ERL_LIB)/lib -lpcap -lerl_interface -lei -lpthread
all: dir erl sccp_node
dir:
-@mkdir -p priv/tmp ebin
erl:
@$(ERL) -noinput +B \
-eval 'case make:all() of up_to_date -> halt(0); error -> halt(1) end.'
sccp_node: c_src/sccp_node
@mv $^ priv/
%.o: c_src/%.c
$(CC) $(ARCH) $(CFLAGS) $(CPPFLAGS) -o c_src/$@ -c $<
clean:
@rm -fv ebin/*.beam c_src/*.o