aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.otp
blob: bcd0c33a5e46512356ce1aa8b2ac81f53dd913ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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