summaryrefslogtreecommitdiff
path: root/Makefile
blob: 790189125c5421ef3164ce09918e34e9f4730a1b (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
LIB_SRCS = utils.c sock_events.c libc_overrides.c
LIB_OBJS = $(LIB_SRCS:.c=.o)

EXTRA_LIBS =

CFLAGS = -Wall
LDFLAGS=-L/usr/lib/titan -fPIC -lttcn3-dynamic

ifdef ENABLE_TITAN
EXTRA_LIBS += titan/titan.a
CFLAGS += -DENABLE_TITAN
endif

default: libudtrace.so

%.o: %.c
	$(CC) $(CFLAGS) -fPIC -o $@ -c $^

libudtrace.so: $(LIB_OBJS) $(EXTRA_LIBS)
	$(CC) $(LDFLAGS) -fPIC -shared -Wl,-soname,libudtrace.so -o $@ $^ -ldl

titan/titan.a:
	$(MAKE) -C titan titan.a

clean:
	rm -f *.o libudtrace.so
personal git repositories of Harald Welte. Your mileage may vary