#
#  Makefile for WSN-Simulation-CH at Center
#
#  ** This file was automatically generated by the command:
#  opp_nmakemake -f -n
#
#  By the Perl version of opp_makemake for MSVC
#


# Name of target to be created (-o option)
TARGET = WSN-Simulation-CH at Center

# User interface (uncomment one) (-u option)
# USERIF_LIBS=$(CMDENV_LIBS)
USERIF_LIBS=$(TKENV_LIBS)

# .ned or .h include paths with -I
INCLUDE_PATH=

# misc additional object and library files to link
EXTRA_OBJS=

# object files from other directories to link with
EXT_DIR_OBJS=

# time stamps of other directories (used as dependency)
EXT_DIR_TSTAMPS=

# Additional libraries (-L, -l, -t options)
LIBS=

#------------------------------------------------------------------------------


!include "C:/OMNeT++/configuser.vc"

# User interface libs
CMDENV_LIBS=envir.lib cmdenv.lib
TKENV_LIBS=envir.lib tkenv.lib $(TK_LIBS)

# Simulation kernel
KERNEL_LIBS=sim_std.lib

!if "$(WITH_NETBUILDER)"=="yes"
KERNEL_LIBS= $(KERNEL_LIBS) nedxml.lib $(XML_LIBS)
!endif

!if "$(WITH_PARSIM)"=="yes"
KERNEL_LIBS= $(KERNEL_LIBS) $(MPI_LIBS)
!endif

# Simulation kernel and user interface libraries
OMNETPP_LIBS=/libpath:$(OMNETPP_LIB_DIR) $(USERIF_LIBS) $(KERNEL_LIBS) $(SYS_LIBS)

COPTS=$(CFLAGS)  $(INCLUDE_PATH) -I$(OMNETPP_INCL_DIR)
NEDCOPTS=$(COPTS) $(NEDCFLAGS)
MSGCOPTS= $(INCLUDE_PATH)

#------------------------------------------------------------------------------
# object files in this directory
OBJS= NedModuls_n.obj MessageType_m.obj BaseStation.obj NodeModul.obj SensingCoverage.obj SensorNode.obj

# header files generated (from msg files)
GENERATEDHEADERS= MessageType_m.h

# subdirectories to recurse into
SUBDIRS= 
SUBDIR_TARGETS= 

$(TARGET): $(OBJS) Makefile.vc  .tstamp

.tstamp: $(OBJS)
	@echo.>.tstamp

$(OBJS) : $(GENERATEDHEADERS)

# purify: $(OBJS) $(EXTRA_OBJS)  Makefile.vc
# 	purify $(CXX) $(LDFLAGS) $(OBJS) $(EXTRA_OBJS) $(EXT_DIR_OBJS) $(LIBS) -L$(OMNETPP_LIB_DIR) $(KERNEL_LIBS) $(USERIF_LIBS) $(SYS_LIBS_PURE) -o $(TARGET).pure

subdirs: $(SUBDIR_TARGETS)

NedModuls_n.obj: NedModuls_n.cpp
	$(CXX) -c $(NEDCOPTS) /Tp NedModuls_n.cpp

NedModuls_n.cpp: NedModuls.ned
	$(NEDC:/=\) -s _n.cpp $(INCLUDE_PATH) NedModuls.ned

MessageType_m.obj: MessageType_m.cpp
	$(CXX) -c $(NEDCOPTS) /Tp MessageType_m.cpp

MessageType_m.cpp MessageType_m.h: MessageType.msg
	$(MSGC:/=\) -s _m.cpp $(MSGCOPTS) MessageType.msg

BaseStation.obj: BaseStation.cpp
	$(CXX) -c $(COPTS) /Tp BaseStation.cpp

NodeModul.obj: NodeModul.cpp
	$(CXX) -c $(COPTS) /Tp NodeModul.cpp

SensingCoverage.obj: SensingCoverage.cpp
	$(CXX) -c $(COPTS) /Tp SensingCoverage.cpp

SensorNode.obj: SensorNode.cpp
	$(CXX) -c $(COPTS) /Tp SensorNode.cpp


#doc: neddoc doxy

#neddoc:
#	@opp_neddoc -a

#doxy: doxy.cfg
#	@doxygen doxy.cfg

generateheaders: $(GENERATEDHEADERS)
	@if not "$(SUBDIRS)"=="" for %%i in ( $(SUBDIRS) ) do @cd %%i && echo [opp_msgc in %%i] && nmake /nologo /f Makefile.vc generateheaders && cd .. || exit /b 1

clean:
	-del *.obj .tstamp *.idb *.pdb *.ilk *.exp $(TARGET) $(TARGET:.exe=.lib) $(TARGET:.dll=.lib) 2>NUL
	-del *_n.cpp *_n.h *_m.cpp *_m.h 2>NUL
	-del *.vec *.sca 2>NUL
	-for %%i in ( $(SUBDIRS) ) do cd %%i && echo [clean in %%i] && nmake /nologo /f Makefile.vc clean && cd .. || exit /b 1

depend:
	$(MAKEDEPEND) $(INCLUDE_PATH) -f Makefile.vc -- *.cpp
	if not "$(SUBDIRS)"=="" for %%i in ( $(SUBDIRS) ) do cd %%i && echo [depend in %%i] && nmake /nologo /f Makefile.vc depend && cd .. || exit /b 1

makefiles:
	opp_nmakemake -f  -n 
	if not "$(SUBDIRS)"=="" for %%i in ( $(SUBDIRS) ) do cd %%i && echo [makemake in %%i] && nmake /nologo /f Makefile.vc makefiles && cd .. || exit /b 1

# "re-makemake" is a deprecated, historic name of the above target
re-makemake: makefiles

# DO NOT DELETE THIS LINE -- make depend depends on it.

