IDS_DIR = /home/folky/thesis/programming/ids/ids_library

#specify application configuration component
COMPONENT= TemperatureAppC
#include needed libraries so the IDS components are included pre-emptively (if malfunctioning, rename originals (see $IDS_DIR/System) in TinyOS installation)
CFLAGS += -I$(IDS_DIR) \
          -I$(IDS_DIR)/DataAcquisition \
          -I$(IDS_DIR)/Detection \
          -I$(IDS_DIR)/Collaboration \
          -I$(IDS_DIR)/System \
          -I$(IDS_DIR)/Interfaces \
          -I$(IDS_DIR)/Attacks \
          -I$(TOSDIR)/lib/printf \
          -I$(TOSDIR)/lib/net \
          -I$(TOSDIR)/lib/net/4bitle \
          -I$(TOSDIR)/lib/net/ctp

#needed for CC2420 in order to disable early packet dropping      
CFLAGS+=-DCC2420_NO_ADDRESS_RECOGNITION

#do not forward received packet via CTP, simulate data aggregation
#CFLAGS+=-DDATA_AGGR

#in order to run the IDS at all
CFLAGS+=-DRUN_IDS

#output simulation log for MoteViz vizualization of simualtion to std.out
#CFLAGS+=-DSAVE_SIM
#output network tree log for MoteViz vizualization of simualtion to std.out
#CFLAGS+=-DNETWORK_TREE

#set low gain mode to monitor with less ambiguos collisions but smaller neighbourhood (set the threshold in Ids.h)
CFLAGS+=-DLOW_GAIN_MODE
#enable for better detection results achieved by clustering (for CTP networks only) 
CFLAGS+=-DCLUSTERING

#set to make nodes collaborate - exchange statistics with immediate neighbours
CFLAGS+=-DCOLLABORATING_IDS
#set only together with COLLABORATING_IDS, especially for sparse networks - received and own statistics are joined together (if disabled, an intersection is used) 
CFLAGS+=-DCOLLABORATION_FOR_SPARSE_NETWORKS
#set to let nodes collaborate with 2-hop neighbours (COLLABORATING_IDS must be enabled)
#CFLAGS+=-DTWO_HOP_COLLAB

#include selective forwarders (attackers), define them in SelectiveForwarders.h
#CFLAGS+=-DSELECTIVE_FORWARDING
#include hello flood attackers, define them in HelloJammers.h
#CFLAGS+=-DHELLO_JAMMING ! MALFUNCTIONING (need to use edited sim_gain.c)
#include nodes that create jamming by sending huge number of extra packets, define them in Jammers.h
#CFLAGS+=-DDECEPTIVE_JAMMING ! MALFUNCTIONING (need to use edited TossimPacketModelC.nc)
#include nodes that create jamming by sending extra packets randomly in time, define them in Jammers.h
#CFLAGS+=-DRANDOM_JAMMING

include $(MAKERULES)

#use following settings, if you want to forward network communication to Java-based PC application
#BUILD_EXTRA_DEPS = RadioMsg.class

#RadioMsg.class: RadioMsg.java
#	javac RadioMsg.java

#RadioMsg.java: Temperature.h
#	mig java -target=$(PLATFORM) $(CFLAGS) -java-classname=RadioMsg Temperature.h RadioMsg -o $@
