Makefile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. include ../../../build.mak
  2. include ../../../build/common.mak
  3. export LIBDIR := ../../lib
  4. RULES_MAK := $(PJDIR)/build/rules.mak
  5. export MILENAGE_LIB := libmilenage-$(TARGET_NAME)$(LIBEXT)
  6. ifeq ($(PJ_SHARED_LIBRARIES),)
  7. else
  8. export MILENAGE_SONAME := libmilenage.$(SHLIB_SUFFIX)
  9. export MILENAGE_SHLIB := $(MILENAGE_SONAME).$(PJ_VERSION_MAJOR)
  10. endif
  11. ###############################################################################
  12. # Gather all flags.
  13. #
  14. export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
  15. $(CFLAGS) $(CC_INC). $(CC_INC)../../milenage/include \
  16. $(CC_INC)../../../pjlib/include
  17. export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
  18. $(HOST_CXXFLAGS) $(CXXFLAGS)
  19. export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
  20. $(LDFLAGS)
  21. export MILENAGE_SRCDIR = ../../milenage
  22. export MILENAGE_OBJS = milenage.o rijndael.o
  23. export MILENAGE_CFLAGS = $(_CFLAGS)
  24. export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
  25. ###############################################################################
  26. # Main entry
  27. #
  28. # $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
  29. #
  30. TARGETS := $(MILENAGE_LIB) $(MILENAGE_SONAME)
  31. all: $(TARGETS)
  32. doc:
  33. cd .. && doxygen docs/doxygen.cfg
  34. dep: depend
  35. distclean: realclean
  36. .PHONY: all dep depend clean realclean distclean
  37. .PHONY: $(TARGETS)
  38. .PHONY: $(MILENAGE_LIB) $(MILENAGE_SONAME)
  39. libmilenage: $(MILENAGE_LIB)
  40. $(MILENAGE_SONAME): $(MILENAGE_LIB)
  41. $(MILENAGE_LIB) $(MILENAGE_SONAME):
  42. $(MAKE) -f $(RULES_MAK) APP=MILENAGE app=libmilenage $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
  43. clean print_lib:
  44. $(MAKE) -f $(RULES_MAK) APP=MILENAGE app=libmilenage $@
  45. realclean:
  46. $(subst @@,$(subst /,$(HOST_PSEP),.ilbc-$(TARGET_NAME).depend),$(HOST_RMR))
  47. $(MAKE) -f $(RULES_MAK) APP=MILENAGE app=libmilenage $@
  48. depend:
  49. $(MAKE) -f $(RULES_MAK) APP=MILENAGE app=libmilenage $@