aboutsummaryrefslogtreecommitdiffstats
path: root/radius_example/Makefile
blob: 883e2f2da5775905c5a58ea6fdb4667d175b66ce (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
ALL=radius_example

all: $(ALL)

ifndef CC
CC=gcc
endif

ifndef LDO
LDO=$(CC)
endif

ifndef CFLAGS
CFLAGS = -MMD -O2 -Wall -g
endif

CFLAGS += -I.
CFLAGS += -I../src
CFLAGS += -I../src/utils

LIBS = ../src/radius/libradius.a
LIBS += ../src/crypto/libcrypto.a
LIBS += ../src/utils/libutils.a
LLIBS = -lrt

../src/utils/libutils.a:
	$(MAKE) -C ../src/utils

../src/crypto/libcrypto.a:
	$(MAKE) -C ../src/crypto

../src/radius/libradius.a:
	$(MAKE) -C ../src/radius

#CLAGS += -DCONFIG_IPV6

OBJS_ex = radius_example.o

radius_example: $(OBJS_ex) $(LIBS)
	$(LDO) $(LDFLAGS) -o radius_example $(OBJS_ex) $(LIBS) $(LLIBS)

clean:
	$(MAKE) -C ../src clean
	rm -f core *~ *.o *.d $(ALL)

-include $(OBJS:%.o=%.d)