Makefile 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. #
  2. # OMNeT++/OMNEST Makefile for QUIC
  3. #
  4. # This file was generated with the command:
  5. # opp_makemake -f --deep -O out -I.
  6. #
  7. # Name of target to be created (-o option)
  8. TARGET = QUIC$(D)$(EXE_SUFFIX)
  9. TARGET_DIR = .
  10. # User interface (uncomment one) (-u option)
  11. USERIF_LIBS = $(ALL_ENV_LIBS) # that is, $(TKENV_LIBS) $(QTENV_LIBS) $(CMDENV_LIBS)
  12. #USERIF_LIBS = $(CMDENV_LIBS)
  13. #USERIF_LIBS = $(TKENV_LIBS)
  14. #USERIF_LIBS = $(QTENV_LIBS)
  15. # C++ include paths (with -I)
  16. INCLUDE_PATH = -I.
  17. # Additional object and library files to link with
  18. EXTRA_OBJS =
  19. # Additional libraries (-L, -l options)
  20. LIBS =
  21. # Output directory
  22. PROJECT_OUTPUT_DIR = out
  23. PROJECTRELATIVE_PATH =
  24. O = $(PROJECT_OUTPUT_DIR)/$(CONFIGNAME)/$(PROJECTRELATIVE_PATH)
  25. # Object files for local .cc, .msg and .sm files
  26. OBJS = \
  27. $O/Frames/ack_m.o \
  28. $O/Frames/application_Close_m.o \
  29. $O/Frames/blocked_m.o \
  30. $O/Frames/connection_close_m.o \
  31. $O/Frames/max_Data_m.o \
  32. $O/Frames/max_Stream_Data_m.o \
  33. $O/Frames/max_Stream_Id_m.o \
  34. $O/Frames/new_Connection_Id_m.o \
  35. $O/Frames/padding_m.o \
  36. $O/Frames/ping_m.o \
  37. $O/Frames/rst_stream_m.o \
  38. $O/Frames/stop_Sending_m.o \
  39. $O/Frames/stream_m.o \
  40. $O/Frames/stream_Blocked_m.o \
  41. $O/Frames/stream_Id_Blocked_m.o \
  42. $O/Headers/long_Header_m.o \
  43. $O/Headers/short_Header_m.o \
  44. $O/Packets/0_RTT_Protected_m.o \
  45. $O/Packets/client_Cleartext_m.o \
  46. $O/Packets/client_Initial_m.o \
  47. $O/Packets/server_Cleartext_m.o \
  48. $O/Packets/server_Stateless_Retry_m.o \
  49. $O/Packets/version_Negotiation_m.o
  50. # Message files
  51. MSGFILES = \
  52. Frames/ack.msg \
  53. Frames/application_Close.msg \
  54. Frames/blocked.msg \
  55. Frames/connection_close.msg \
  56. Frames/max_Data.msg \
  57. Frames/max_Stream_Data.msg \
  58. Frames/max_Stream_Id.msg \
  59. Frames/new_Connection_Id.msg \
  60. Frames/padding.msg \
  61. Frames/ping.msg \
  62. Frames/rst_stream.msg \
  63. Frames/stop_Sending.msg \
  64. Frames/stream.msg \
  65. Frames/stream_Blocked.msg \
  66. Frames/stream_Id_Blocked.msg \
  67. Headers/long_Header.msg \
  68. Headers/short_Header.msg \
  69. Packets/0_RTT_Protected.msg \
  70. Packets/client_Cleartext.msg \
  71. Packets/client_Initial.msg \
  72. Packets/server_Cleartext.msg \
  73. Packets/server_Stateless_Retry.msg \
  74. Packets/version_Negotiation.msg
  75. # SM files
  76. SMFILES =
  77. #------------------------------------------------------------------------------
  78. # Pull in OMNeT++ configuration (Makefile.inc)
  79. ifneq ("$(OMNETPP_CONFIGFILE)","")
  80. CONFIGFILE = $(OMNETPP_CONFIGFILE)
  81. else
  82. ifneq ("$(OMNETPP_ROOT)","")
  83. CONFIGFILE = $(OMNETPP_ROOT)/Makefile.inc
  84. else
  85. CONFIGFILE = $(shell opp_configfilepath)
  86. endif
  87. endif
  88. ifeq ("$(wildcard $(CONFIGFILE))","")
  89. $(error Config file '$(CONFIGFILE)' does not exist -- add the OMNeT++ bin directory to the path so that opp_configfilepath can be found, or set the OMNETPP_CONFIGFILE variable to point to Makefile.inc)
  90. endif
  91. include $(CONFIGFILE)
  92. # Simulation kernel and user interface libraries
  93. OMNETPP_LIBS = $(OPPMAIN_LIB) $(USERIF_LIBS) $(KERNEL_LIBS) $(SYS_LIBS)
  94. COPTS = $(CFLAGS) $(IMPORT_DEFINES) $(INCLUDE_PATH) -I$(OMNETPP_INCL_DIR)
  95. MSGCOPTS = $(INCLUDE_PATH)
  96. SMCOPTS =
  97. # we want to recompile everything if COPTS changes,
  98. # so we store COPTS into $COPTS_FILE and have object
  99. # files depend on it (except when "make depend" was called)
  100. COPTS_FILE = $O/.last-copts
  101. ifneq ("$(COPTS)","$(shell cat $(COPTS_FILE) 2>/dev/null || echo '')")
  102. $(shell $(MKPATH) "$O" && echo "$(COPTS)" >$(COPTS_FILE))
  103. endif
  104. #------------------------------------------------------------------------------
  105. # User-supplied makefile fragment(s)
  106. # >>>
  107. # <<<
  108. #------------------------------------------------------------------------------
  109. # Main target
  110. all: $(TARGET_DIR)/$(TARGET)
  111. $(TARGET_DIR)/% :: $O/%
  112. @mkdir -p $(TARGET_DIR)
  113. $(Q)$(LN) $< $@
  114. ifeq ($(TOOLCHAIN_NAME),clangc2)
  115. $(Q)-$(LN) $(<:%.dll=%.lib) $(@:%.dll=%.lib)
  116. endif
  117. $O/$(TARGET): $(OBJS) $(wildcard $(EXTRA_OBJS)) Makefile $(CONFIGFILE)
  118. @$(MKPATH) $O
  119. @echo Creating executable: $@
  120. $(Q)$(CXX) $(LDFLAGS) -o $O/$(TARGET) $(OBJS) $(EXTRA_OBJS) $(AS_NEEDED_OFF) $(WHOLE_ARCHIVE_ON) $(LIBS) $(WHOLE_ARCHIVE_OFF) $(OMNETPP_LIBS)
  121. .PHONY: all clean cleanall depend msgheaders smheaders
  122. .SUFFIXES: .cc
  123. $O/%.o: %.cc $(COPTS_FILE) | msgheaders smheaders
  124. @$(MKPATH) $(dir $@)
  125. $(qecho) "$<"
  126. $(Q)$(CXX) -c $(CXXFLAGS) $(COPTS) -o $@ $<
  127. %_m.cc %_m.h: %.msg
  128. $(qecho) MSGC: $<
  129. $(Q)$(MSGC) -s _m.cc $(MSGCOPTS) $?
  130. %_sm.cc %_sm.h: %.sm
  131. $(qecho) SMC: $<
  132. $(Q)$(SMC) -c++ -suffix cc $(SMCOPTS) $?
  133. msgheaders: $(MSGFILES:.msg=_m.h)
  134. smheaders: $(SMFILES:.sm=_sm.h)
  135. clean:
  136. $(qecho) Cleaning $(TARGET)
  137. $(Q)-rm -rf $O
  138. $(Q)-rm -f $(TARGET_DIR)/$(TARGET)
  139. $(Q)-rm -f $(TARGET_DIR)/$(TARGET:%.dll=%.lib)
  140. $(Q)-rm -f $(call opp_rwildcard, . , *_m.cc *_m.h *_sm.cc *_sm.h)
  141. cleanall:
  142. $(Q)$(MAKE) -s clean MODE=release
  143. $(Q)$(MAKE) -s clean MODE=debug
  144. $(Q)-rm -rf $(PROJECT_OUTPUT_DIR)
  145. # include all dependencies
  146. -include $(OBJS:%.o=%.d)