
include ../../Makefile.def

##############################################################################
# List of include file directories required for compilation
INCLUDES = -Iinclude/\
	   -Iinclude/csp/\
	   -Iinclude/csp/interfaces/\
	   -Iinclude/csp/drivers/\
	   -Iinclude/csp/crypto/\
	   -Iinclude/csp/arch/\
	   -Iinclude/csp/arch/posix\
	   -Isrc/\
	   -Isrc/transport\
	   -Isrc/rtable\
	   -Isrc/interfaces\
	   -Isrc/arch\
	   -Isrc/arch/posix\

##############################################################################
# List of source files required for compilation using SRC
# mention the directory path where all C files to be compiled usig SRC_DIR
# Mention Sub director makefile compilation using SUBDIR

SRC = src/*.c\
      src/transport/*.c\
      src/rtable/*.c\
      src/interfaces/*.c\
      src/crypto/*.c\
      src/arch/*.c\
      src/arch/posix/*.c\

##############################################################################
# Command to compile source files to intermediate object files
all:
	$(CC) $(CFLAGS) -c $(SRC) $(INCLUDES)
	ar rcs libcsp_lib.a ./*.o
	rm -f ./*.o

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