# # OMNeT++/OMNEST Makefile for libprojA # # This file was generated with the command: # opp_makemake -f --deep --make-lib -O out -I. -I../extra # # Name of target to be created (-o option) TARGET = libprojA$(A_LIB_SUFFIX) # C++ include paths (with -I) INCLUDE_PATH = -I. -I../extra # Additional object and library files to link with EXTRA_OBJS = # Output directory PROJECT_OUTPUT_DIR = ../out PROJECTRELATIVE_PATH = src O = $(PROJECT_OUTPUT_DIR)/$(CONFIGNAME)/$(PROJECTRELATIVE_PATH) # Object files for local .cc, .msg and .sm files OBJS = $O/a/af1/af1sm.o $O/a/af2/af2sm.o $O/a/af1/af1message_m.o # Message files MSGFILES = \ a/af1/af1message.msg # SM files SMFILES = #------------------------------------------------------------------------------ # Pull in OMNeT++ configuration (Makefile.inc or configuser.vc) ifneq ("$(OMNETPP_CONFIGFILE)","") CONFIGFILE = $(OMNETPP_CONFIGFILE) else ifneq ("$(OMNETPP_ROOT)","") CONFIGFILE = $(OMNETPP_ROOT)/Makefile.inc else CONFIGFILE = $(shell opp_configfilepath) endif endif ifeq ("$(wildcard $(CONFIGFILE))","") $(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) endif include $(CONFIGFILE) COPTS = $(CFLAGS) $(INCLUDE_PATH) -I$(OMNETPP_INCL_DIR) MSGCOPTS = $(INCLUDE_PATH) SMCOPTS = # we want to recompile everything if COPTS changes, # so we store COPTS into $COPTS_FILE and have object # files depend on it (except when "make depend" was called) COPTS_FILE = $O/.last-copts ifneq ($(MAKECMDGOALS),depend) ifneq ("$(COPTS)","$(shell cat $(COPTS_FILE) 2>/dev/null || echo '')") $(shell $(MKPATH) "$O" && echo "$(COPTS)" >$(COPTS_FILE)) endif endif #------------------------------------------------------------------------------ # User-supplied makefile fragment(s) # >>> # <<< #------------------------------------------------------------------------------ # Main target all: $O/$(TARGET) $(Q)$(LN) $O/$(TARGET) . $O/$(TARGET): $(OBJS) $(wildcard $(EXTRA_OBJS)) Makefile @$(MKPATH) $O @echo Creating static library: $@ $(Q)$(AR) $O/$(TARGET) $(OBJS) $(EXTRA_OBJS) .PHONY: all clean cleanall depend msgheaders smheaders .SUFFIXES: .cc $O/%.o: %.cc $(COPTS_FILE) | msgheaders smheaders @$(MKPATH) $(dir $@) $(qecho) "$<" $(Q)$(CXX) -c $(CXXFLAGS) $(COPTS) -o $@ $< %_m.cc %_m.h: %.msg $(qecho) MSGC: $< $(Q)$(MSGC) -s _m.cc $(MSGCOPTS) $? %_sm.cc %_sm.h: %.sm $(qecho) SMC: $< $(Q)$(SMC) -c++ -suffix cc $(SMCOPTS) $? msgheaders: $(MSGFILES:.msg=_m.h) smheaders: $(SMFILES:.sm=_sm.h) clean: $(qecho) Cleaning... $(Q)-rm -rf $O $(Q)-rm -f projA projA.exe libprojA.so libprojA.a libprojA.dll libprojA.dylib $(Q)-rm -f ./*_m.cc ./*_m.h ./*_sm.cc ./*_sm.h $(Q)-rm -f a/*_m.cc a/*_m.h a/*_sm.cc a/*_sm.h $(Q)-rm -f a/af1/*_m.cc a/af1/*_m.h a/af1/*_sm.cc a/af1/*_sm.h $(Q)-rm -f a/af2/*_m.cc a/af2/*_m.h a/af2/*_sm.cc a/af2/*_sm.h cleanall: clean $(Q)-rm -rf $(PROJECT_OUTPUT_DIR) # include all dependencies -include $(OBJS:%.o=%.d)