Makefile 5.2 KB

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