2008-02-28 02:34:43 +01:00
|
|
|
ALL=radius_example
|
|
|
|
|
|
|
|
all: $(ALL)
|
|
|
|
|
|
|
|
ifndef CC
|
|
|
|
CC=gcc
|
|
|
|
endif
|
|
|
|
|
2009-12-24 11:05:51 +01:00
|
|
|
ifndef LDO
|
|
|
|
LDO=$(CC)
|
|
|
|
endif
|
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
ifndef CFLAGS
|
|
|
|
CFLAGS = -MMD -O2 -Wall -g
|
|
|
|
endif
|
|
|
|
|
|
|
|
CFLAGS += -I.
|
|
|
|
CFLAGS += -I../src
|
|
|
|
CFLAGS += -I../src/utils
|
|
|
|
|
2009-12-24 11:05:51 +01:00
|
|
|
LIBS = ../src/radius/libradius.a
|
|
|
|
LIBS += ../src/crypto/libcrypto.a
|
|
|
|
LIBS += ../src/utils/libutils.a
|
2008-02-28 02:34:43 +01:00
|
|
|
|
2009-12-24 11:05:51 +01:00
|
|
|
../src/utils/libutils.a:
|
|
|
|
$(MAKE) -C ../src/utils
|
2008-02-28 02:34:43 +01:00
|
|
|
|
2009-12-24 11:05:51 +01:00
|
|
|
../src/crypto/libcrypto.a:
|
|
|
|
$(MAKE) -C ../src/crypto
|
2008-02-28 02:34:43 +01:00
|
|
|
|
2009-12-24 11:05:51 +01:00
|
|
|
../src/radius/libradius.a:
|
|
|
|
$(MAKE) -C ../src/radius
|
2008-02-28 02:34:43 +01:00
|
|
|
|
|
|
|
OBJS_ex = radius_example.o
|
|
|
|
|
2009-12-24 11:05:51 +01:00
|
|
|
radius_example: $(OBJS_ex) $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o radius_example $(OBJS_ex) $(LIBS)
|
2008-02-28 02:34:43 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
$(MAKE) -C ../src clean
|
2009-12-24 11:05:51 +01:00
|
|
|
rm -f core *~ *.o *.d $(ALL)
|
2008-02-28 02:34:43 +01:00
|
|
|
|
|
|
|
-include $(OBJS:%.o=%.d)
|