Makefile 706 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ALL=radius_example
  2. all: $(ALL)
  3. ifndef CC
  4. CC=gcc
  5. endif
  6. ifndef LDO
  7. LDO=$(CC)
  8. endif
  9. ifndef CFLAGS
  10. CFLAGS = -MMD -O2 -Wall -g
  11. endif
  12. CFLAGS += -I.
  13. CFLAGS += -I../src
  14. CFLAGS += -I../src/utils
  15. LIBS = ../src/radius/libradius.a
  16. LIBS += ../src/crypto/libcrypto.a
  17. LIBS += ../src/utils/libutils.a
  18. LLIBS = -lrt
  19. ../src/utils/libutils.a:
  20. $(MAKE) -C ../src/utils
  21. ../src/crypto/libcrypto.a:
  22. $(MAKE) -C ../src/crypto
  23. ../src/radius/libradius.a:
  24. $(MAKE) -C ../src/radius
  25. #CLAGS += -DCONFIG_IPV6
  26. OBJS_ex = radius_example.o
  27. radius_example: $(OBJS_ex) $(LIBS)
  28. $(LDO) $(LDFLAGS) -o radius_example $(OBJS_ex) $(LIBS) $(LLIBS)
  29. clean:
  30. $(MAKE) -C ../src clean
  31. rm -f core *~ *.o *.d $(ALL)
  32. -include $(OBJS:%.o=%.d)