
CFLAGS_GS += -Wall -g


###################################################################################
# Expect ACK for each FTDS sequence sent to receiver node
#CFLAGS_GS += -DFTDS_ACK_EN
#####################################-END-############################################



###################################################################################
# Enable CRC corruption 
#CFLAGS_GS += -DFTM_CRC_CORRUPT_EN
####################################-END-###########################################



###################################################################################
# Packet Loss detection & recovery test macros

# Option1:
# Enable Manual Sequnec Drop option by entering letter y or n  
#CFLAGS_GS += -DFTM_SEQ_DROP_EN_YES_NO

# Option 2
# Enable sequnec Drop test using file based input.  
# the drop sequnce IDs should be listed/entered in droplist.txt file in the order for example $2,9,103,105,5426,9,7# 
#CFLAGS_GS += -DFTM_SEQ_DROP_EN_FILE
####################################-END-############################################S


####################################################################################
# Enable SBAND failure to create Auto Save context feature 
#CFLAGS_GS += -DFTM_SBAN_FAIL_EN

# if macro FTM_SBAN_FAIL_EN is enabled, anyone of the below following macro to be enabled

# Option1 sband failure macro: sband failure will trigger during SEQ 5 and skip all the remainaing sequence
#CFLAGS_GS += -DFTM_SBAN_FAIL_EN_START5_SKIP_ALL_SEQ

# Option2 sband failure macro: sband failure will trigger during SEQ 5 and skip next 100 sequence
#CFLAGS_GS += -DFTM_SBAN_FAIL_EN_START5_SKIP_100_SEQ

# Option3 sband failure macro: sband failure will trigger during SEQ 5 and skip next sequence only
#CFLAGS_GS += -DFTM_SBAN_FAIL_EN_START5_SKIP_2_SEQ

# Option4 sband failure macro: sband failure will trigger during SEQ 5 and there will be no sequnce skip
#CFLAGS_GS += -DFTM_SBAN_FAIL_EN_START5_NOSKIP
#######################################-END-############################################



###################################################################################
# Enable Suspend / Resume Request drop test for GS
#CFLAGS_GS += -DFT_SUSRES_TEST
####################################-END-###########################################




# define any compile-time flags
CFLAGS_SAT = -Wall -g -DFT_SAT


###################################################################################
# Enable Suspend / Resume Request drop test for PS
#CFLAGS_SAT += -DFT_SUSRES_TEST
####################################-END-###########################################




# define any compile-time flags
CFLAGS_OBC = -Wall -g -DFT_SAT -DFT_OBC

# List of include file directories required for compilation
INCLUDES = -I inc/\

# List of source files required for compilation
SRC = src/*.c\

all: gs sat

# Command to compile source files to intermediate object files
gs:
	$(CC) $(CFLAGS_GS) -c $(SRC) $(INCLUDES)
	ar rcs libft_gs_lib.a debug_hooks.o file_transfer.o fsm.o ftci.o ftci_decode.o ftds.o ftds_decode.o ftfci.o ftfci_decode.o ftsr.o ftsr_decode.o ft_receiver.o ft_sender.o ft_timer.o get_input.o notify_apps.o segmentation.o suspend_resume.o file_integrity_check.o ft_debug.o ftm_version.o
	rm -f ./*.o

sat:
	$(CC) $(CFLAGS_SAT) -c $(SRC) $(INCLUDES)
	ar rcs libft_ps_lib.a debug_hooks.o file_transfer.o fsm.o ftci.o ftci_decode.o ftds.o ftds_decode.o ftfci.o ftfci_decode.o ftsr.o ftsr_decode.o ft_receiver.o ft_sender.o ft_timer.o get_input.o notify_apps.o segmentation.o suspend_resume.o file_integrity_check.o ft_debug.o ftm_version.o
	rm -f ./*.o

# Command to delete intermediate object files
clean_o:
	rm -f ./*.o

clean:
	rm -f ./*.o
	rm -f ./*.a
